author | mikaruus <mika.a.ruuskanen@nokia.com> |
Wed, 21 Apr 2010 14:29:55 +0300 | |
changeset 8 | 6295dc2169f3 |
parent 5 | 8ccc39f9d787 |
child 9 | 8486d82aef45 |
permissions | -rw-r--r-- |
0 | 1 |
/* |
2 |
* Copyright (c) 2007-2008 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 the License "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: |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
||
19 |
||
20 |
#ifndef CMMNETMESSHANDLER_H |
|
21 |
#define CMMNETMESSHANDLER_H |
|
22 |
||
23 |
// INCLUDES |
|
24 |
#include <e32base.h> // Symbian base types |
|
25 |
#include <etelmm.h> // Symbian Etel related types |
|
26 |
||
27 |
#include "mmmmesshandlerbase.h" |
|
28 |
#include "cmmphonetreceiver.h" |
|
29 |
#include "muiccoperationbase.h" |
|
30 |
#include "nokiatsy_internal_variation.h" |
|
31 |
||
32 |
// CONSTANTS |
|
33 |
||
34 |
// 2.8 AVKON LAF UI specification states that signal strength is |
|
35 |
// indicated by 0 to 7 bars |
|
36 |
const TInt8 KMaxSignalStrengthBars = 7; |
|
37 |
// GpdsRadioActivityInd / GPDS_RADIO_OFF completion delay (2000000us = 2 seconds) |
|
38 |
const TInt KGPDSRAICompleteDelay = 2000000; |
|
39 |
||
40 |
// MACROS |
|
41 |
//None |
|
42 |
||
43 |
// DATA TYPES |
|
44 |
typedef TBuf<4> TOperatorCode; // Code data size is 4 |
|
45 |
typedef TBuf<3> TCountryCode; // Code data size is 3 |
|
46 |
||
47 |
// FUNCTION PROTOTYPES |
|
48 |
//None |
|
49 |
||
50 |
// FORWARD DECLARATIONS |
|
51 |
class CMmPhoNetSender; |
|
52 |
class CMmDataPackage; |
|
53 |
class CMmNetOperatorNameHandler; |
|
54 |
class CMmMessageRouter; |
|
55 |
class TIsiReceiveC; |
|
56 |
class TIsiSubBlock; |
|
57 |
class CDelayTimer; |
|
58 |
class CMmUiccMessHandler; |
|
59 |
||
60 |
// CLASS DECLARATION |
|
61 |
||
62 |
/** |
|
63 |
* Used for creating and sending NET server's ISI messages to |
|
64 |
* PhoNet via PhoNetSender. It also receives NET server's |
|
65 |
* ISI messages from PhoNetReceiver. |
|
66 |
*/ |
|
67 |
class CMmNetMessHandler |
|
68 |
: public CBase, public MMmMessHandlerBase, public MMmMessageReceiver, |
|
69 |
public MUiccOperationBase |
|
70 |
{ |
|
71 |
public: // Constructors and destructor |
|
72 |
||
73 |
/** |
|
74 |
* Two-phased constructor. |
|
75 |
* @param aPhoNetSender: pointer to the Phonet sender. |
|
76 |
* @param aPhoNetReceiver: pointer to the Phonet receiver. |
|
77 |
* @param aMessageRouter: Pointer to the message router. |
|
78 |
* @return created message handler object. |
|
79 |
*/ |
|
80 |
static CMmNetMessHandler* NewL( |
|
81 |
CMmPhoNetSender* aPhoNetSender, |
|
82 |
CMmPhoNetReceiver* aPhoNetReceiver, |
|
83 |
CMmMessageRouter* aMessageRouter, |
|
84 |
CMmUiccMessHandler* aUiccMessHandler ); |
|
85 |
||
86 |
/** |
|
87 |
* Destructor. |
|
88 |
*/ |
|
89 |
~CMmNetMessHandler(); |
|
90 |
||
91 |
public: // Functions |
|
92 |
||
93 |
/** |
|
94 |
* Handle UICC response messages |
|
95 |
* @param aTraId Transaction ID |
|
96 |
* @param aFileData Descriptor for file data |
|
97 |
* @return KErrNone or error code |
|
98 |
*/ |
|
5
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
99 |
TInt ProcessUiccMsg( TInt aTraId, TInt aStatus, TUint8 aDetails, const TDesC8& aFileData ); |
0 | 100 |
|
101 |
/** |
|
102 |
* Entry point for request from the message manager |
|
103 |
* @param aIpc |
|
104 |
* @param CMmDataPackage |
|
105 |
* @return TInt ret: KErrNone or error code |
|
106 |
*/ |
|
107 |
TInt ExtFuncL( TInt aIpc, const CMmDataPackage* aDataPackage ); |
|
108 |
||
109 |
/** |
|
110 |
* Handles a received message by calling the specific |
|
111 |
* message handling method. |
|
112 |
* @param TIsiReceiveC, reference to the received message. |
|
113 |
*/ |
|
114 |
void ReceiveMessageL( const TIsiReceiveC& aIsiMessage ); |
|
115 |
||
116 |
/** |
|
117 |
* Handles errors coming from PhoNetReceiver RunError |
|
118 |
* @param const TIsiReceiveC& aIsiMessage: The received ISI message |
|
119 |
* @param TInt aError: Error code |
|
120 |
*/ |
|
121 |
void HandleError( const TIsiReceiveC& aIsiMessage, TInt aError ); |
|
122 |
||
123 |
/** |
|
124 |
* Returns boolean of IMS PIN verify status |
|
125 |
* @return TBool: EFalse or ETrue |
|
126 |
*/ |
|
127 |
TBool GetImsPinVerifyStatus(); |
|
128 |
||
129 |
/** |
|
130 |
* Maps the isa operator code to Symbian values |
|
131 |
* @param TDesC8 aIsaOperatorAndCountryCode: Operator and country code |
|
132 |
* @param TMobilePhoneNetworkIdentity aOperatorCode: Network identity |
|
133 |
* @param TMobilePhoneNetworkCountryCode aCountryCode: Country code |
|
134 |
* @param TInt aMNCLength: Mnc default lenght is three |
|
135 |
* @return TBool networkCodeMapped: EFalse or ETrue |
|
136 |
*/ |
|
137 |
static TBool MapOperatorAndCountryCode( |
|
138 |
const TDesC8& aIsaOperatorAndCountryCode, |
|
139 |
RMobilePhone::TMobilePhoneNetworkIdentity& aOperatorCode, |
|
140 |
RMobilePhone::TMobilePhoneNetworkCountryCode& aCountryCode, |
|
141 |
TInt aMNCLength = 3 ); |
|
142 |
||
143 |
/** |
|
144 |
* Maps the isa network status to symbian values. |
|
145 |
* @param TUint8 aISANetworkStatus: Network status value. |
|
146 |
* @param TMobilePhoneNetworkStatus aNWStatus: Network status value. |
|
147 |
* @return None |
|
148 |
*/ |
|
149 |
static void MapNwStatus( |
|
150 |
TUint8 aISANetworkStatus, |
|
151 |
RMobilePhone::TMobilePhoneNetworkStatus& aNWStatus ); |
|
152 |
||
153 |
/** |
|
154 |
* Saves GPDS radio activity information and completes |
|
155 |
* NotifyCurrentNetworkChange if state changed. |
|
156 |
* @param aNewPacketTrancferStatus: New radio activity state |
|
157 |
*/ |
|
158 |
void CompleteGpdsRadioActivityInd( TBool aNewPacketTrancferStatus ); |
|
159 |
||
160 |
/** |
|
161 |
* Completes IPC EMobilePhoneNotifyCurrentNetworkChange and |
|
162 |
* EMobilePhoneGetNetworkRegistrationStatus. |
|
163 |
* @param aLocationAreaData includes Location Area data |
|
164 |
* @param aNetworkInfoData includes Network data |
|
165 |
*/ |
|
166 |
void CompleteMobilePhoneNotifyCurrentNetworkChange( |
|
167 |
const RMobilePhone::TMobilePhoneLocationAreaV1& aLocationAreaData, |
|
168 |
const RMobilePhone::TMobilePhoneNetworkInfoV5& aNetworkInfoData ); |
|
169 |
||
170 |
/** |
|
171 |
* Continue handling of queued messages if available. |
|
172 |
* @return None |
|
173 |
*/ |
|
174 |
void ContinueHandlingNetModemRegStatusMessages(); |
|
175 |
||
176 |
/** |
|
177 |
* Starts reading Operator Name String and Operator PLMN List rules |
|
178 |
* when SIM is ready. |
|
179 |
* @return None |
|
180 |
*/ |
|
181 |
void InitializeOnsAndOplReading(); |
|
182 |
||
183 |
/** |
|
184 |
* Gets pointer to CMmMessageRouter class. |
|
185 |
* @return Pointer to CMmMessageRouter object. |
|
186 |
*/ |
|
187 |
CMmMessageRouter* GetMessageRouter(); |
|
188 |
||
189 |
/** |
|
190 |
* Gets pointer to CMmPhoNetSender class. |
|
191 |
* @return Pointer to CMmPhoNetSender object. |
|
192 |
*/ |
|
193 |
CMmPhoNetSender* GetPhoNetSender(); |
|
194 |
||
195 |
/** |
|
196 |
* Gets pointer to CMmNetOperatorNameHandler class. |
|
197 |
* @return Pointer to CMmNetOperatorNameHandler object. |
|
198 |
*/ |
|
199 |
CMmNetOperatorNameHandler* GetNetOperatorNameHandler(); |
|
200 |
||
201 |
/** |
|
202 |
* Extracts network registration status from NET_MODEM_REG_STATUS_IND, |
|
203 |
* NET_SET_RESP or NET_MODEM_REG_STATUS_GET_RESP |
|
204 |
* @param aIsiMessage ISI-message to extract data from |
|
205 |
* @param aRegistrationStatus resulting registration status |
|
206 |
* @return TInt KErrNone, KErrNotFound if subblock not found |
|
207 |
* or system-wide error |
|
208 |
*/ |
|
209 |
TInt ExtractNetworkRegistrationStatus( |
|
210 |
const TIsiReceiveC& aIsiMessage, |
|
211 |
TUint8& aRegistrationStatus |
|
212 |
) const; |
|
213 |
||
8
6295dc2169f3
New release based on our 2010wk15 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
5
diff
changeset
|
214 |
/** |
6295dc2169f3
New release based on our 2010wk15 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
5
diff
changeset
|
215 |
* Handles last received NET_MODEM_REG_STATUS_IND again |
6295dc2169f3
New release based on our 2010wk15 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
5
diff
changeset
|
216 |
* so that network information is completed to the upper |
6295dc2169f3
New release based on our 2010wk15 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
5
diff
changeset
|
217 |
* layers |
6295dc2169f3
New release based on our 2010wk15 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
5
diff
changeset
|
218 |
* @return void |
6295dc2169f3
New release based on our 2010wk15 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
5
diff
changeset
|
219 |
*/ |
6295dc2169f3
New release based on our 2010wk15 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
5
diff
changeset
|
220 |
void HandleLastNetModemRegStatusInd(); |
6295dc2169f3
New release based on our 2010wk15 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
5
diff
changeset
|
221 |
|
0 | 222 |
private: // Constructors and destructor |
223 |
||
224 |
/** |
|
225 |
* 2nd phase constructor |
|
226 |
*/ |
|
227 |
void ConstructL(); |
|
228 |
||
229 |
private: // Functions |
|
230 |
||
231 |
/** |
|
232 |
* Breaks a NET_MODEM_REG_STATUS_IND ISI-message. |
|
233 |
* @param TIsiReceiveC& aIsiMessage: Received ISI message |
|
234 |
* @return None |
|
235 |
*/ |
|
236 |
void NetModemRegStatusInd( const TIsiReceiveC& aIsiMessage ); |
|
237 |
||
238 |
/** |
|
239 |
* Sends a NET_MODEM_REG_STATUS_GET_REQ ISI-message. |
|
240 |
* @param TUint8 aTransactionId: Transaction id |
|
241 |
* @return TInt, success/failure value |
|
242 |
*/ |
|
243 |
TInt NetModemRegStatusGetReq( TUint8 aTransactionId ) const; |
|
244 |
||
245 |
/** |
|
246 |
* Net modem available get request. |
|
247 |
* @param TUint8 aTransactionId: Transaction id |
|
248 |
* @return TInt, success/failure value |
|
249 |
*/ |
|
250 |
TInt NetModemAvailableGetReq( TUint8 aTransactionId ) const; |
|
251 |
||
252 |
/** |
|
253 |
* GSM specific part of NET_MODEM_AVAILABLE_GET_RESP ISI-message. |
|
254 |
* @param TIsiReceiveC& aIsiMessage: Received ISI message |
|
255 |
* @return None |
|
256 |
*/ |
|
257 |
void NetModemAvailableGetRespL( const TIsiReceiveC& aIsiMessage ) const; |
|
258 |
||
259 |
/** |
|
260 |
* Net available cancel request. |
|
261 |
* @param TUint8 aTransactionId: Transaction id |
|
262 |
* @return TInt, success/failure value |
|
263 |
*/ |
|
264 |
TInt NetAvailableCancelReq( TUint8 aTransactionId ); |
|
265 |
||
266 |
/** |
|
267 |
* Net available cancel response. |
|
268 |
* @param TIsiReceiveC& aIsiMessage: Received ISI message |
|
269 |
* @return None |
|
270 |
*/ |
|
271 |
void NetAvailableCancelResp( const TIsiReceiveC& aIsiMessage ); |
|
272 |
||
273 |
/** |
|
274 |
* Net set request. |
|
275 |
* @param TUint8 aTransactionId: Transaction id |
|
276 |
* @param TBool aIsManual: Mode of the Selection |
|
277 |
* @param TOperatorCode aMnc: Pointer to MNC code |
|
278 |
* @param TCountryCode aMcc: Pointer to MCC code |
|
279 |
* @return TInt, success/failure value |
|
280 |
*/ |
|
281 |
TInt NetSetReq( |
|
282 |
TUint8 aTransactionId, |
|
283 |
TBool aIsManual, |
|
284 |
const TOperatorCode& aMnc, |
|
285 |
const TCountryCode& aMcc ) const; |
|
286 |
||
287 |
/** |
|
288 |
* Net set cancel request. |
|
289 |
* @param TUint8 aTransactionId: Transaction id |
|
290 |
* @return TInt, success/failure value |
|
291 |
*/ |
|
292 |
TInt NetSetCancelReq( TUint8 aTransactionId ); |
|
293 |
||
294 |
/** |
|
295 |
* Net set cancel response |
|
296 |
* @param TIsiReceiveC& aIsiMessage: Received ISI message |
|
297 |
* @retrun None |
|
298 |
*/ |
|
299 |
void NetSetCancelResp( const TIsiReceiveC& aIsiMessage ); |
|
300 |
||
301 |
/** |
|
302 |
* Request the current Radio access technology |
|
303 |
* @param TUint8 aTransactionId: Transaction id |
|
304 |
* @return TInt: Error code |
|
305 |
*/ |
|
306 |
TInt NetRatReq( TUint8 aTransactionId ) const; |
|
307 |
||
308 |
/** |
|
309 |
* Breaks a NET_RAT_RESP ISI message |
|
310 |
* @param TIsiReceiveC& aIsiMessage: Received ISI message |
|
311 |
* @return None |
|
312 |
*/ |
|
313 |
void NetRatResp( const TIsiReceiveC& aIsiMessage ); |
|
314 |
||
315 |
/** |
|
316 |
* Net network select mode set req. |
|
317 |
* @param TUint8 aTransactionId: Transaction id |
|
318 |
* @param RMobilePhone::TMobilePhoneNetworkSelectionV1& aNetworkSelection: |
|
319 |
* Network selection |
|
320 |
* @return TInt, success/failure value |
|
321 |
*/ |
|
322 |
TInt NetNetworkSelectModeSetReq( |
|
323 |
TUint8 aTransactionId, |
|
324 |
const RMobilePhone::TMobilePhoneNetworkSelectionV1& aNetworkSelection ) const; |
|
325 |
||
326 |
/** |
|
327 |
* Net network select mode set response |
|
328 |
* @param TIsiReceiveC& aIsiMessage: Received ISI message |
|
329 |
* @return None |
|
330 |
*/ |
|
331 |
void NetNetworkSelectModeSetResp( const TIsiReceiveC& aIsiMessage ) const; |
|
332 |
||
333 |
/** |
|
334 |
* Network Get RSSI request. |
|
335 |
* @param None |
|
336 |
* @return TInt, success/failure value |
|
337 |
*/ |
|
338 |
TInt NetRssiGetReq() const; |
|
339 |
||
340 |
/** |
|
341 |
* Network Get RSSI response. |
|
342 |
* @param TIsiReceiveC& aIsiMessage: Received ISI message |
|
343 |
* @return None |
|
344 |
*/ |
|
345 |
void NetRssiGetResp( const TIsiReceiveC& aIsiMessage ); |
|
346 |
||
347 |
/** |
|
348 |
* Network RSSI indication. |
|
349 |
* @param TIsiReceiveC& aIsiMessage: Received ISI message |
|
350 |
* @return None |
|
351 |
*/ |
|
352 |
void NetRssiInd( const TIsiReceiveC& aIsiMessage ); |
|
353 |
||
354 |
/** |
|
355 |
* Handle RSSI and complete to CommonTSY. |
|
356 |
* @param TUint8 aBarsIsi: bar percentage (ISI value) |
|
357 |
* @return TUint8 aRSSIIsi: RSSI in dBm with inverse sign (ISI value) |
|
358 |
*/ |
|
359 |
void HandleRssi( |
|
360 |
TUint8 aBarsIsi, |
|
361 |
TUint8 aRSSIIsi ) const; |
|
362 |
||
363 |
/** |
|
364 |
* Network time indication. |
|
365 |
* @param TIsiReceiveC& aIsiMessage: Received ISI message |
|
366 |
* @return None |
|
367 |
*/ |
|
368 |
void NetTimeInd( const TIsiReceiveC& aIsiMessage ) const; |
|
369 |
||
370 |
/** |
|
371 |
* Network ciphering indication. |
|
372 |
* @param TIsiReceiveC& aIsiMessage: Received ISI message |
|
373 |
* @return None |
|
374 |
*/ |
|
375 |
void NetCipheringInd( const TIsiReceiveC& aIsiMessage ) const; |
|
376 |
||
377 |
/** |
|
378 |
* Ciphering indicator read request |
|
379 |
* @return Error code |
|
380 |
*/ |
|
381 |
TInt UiccReadCiReq(); |
|
382 |
||
383 |
/** |
|
384 |
* Ciphering indicator read response |
|
385 |
* @param aStatus Status |
|
386 |
* @param aFileData File data |
|
387 |
* @return None |
|
388 |
*/ |
|
389 |
void UiccReadCiResp( TInt aStatus, const TDesC8& aFileData ); |
|
390 |
||
391 |
/** |
|
392 |
* Network radio information indication. |
|
393 |
* @param const TIsiReceiveC& aIsiMessage: Received ISI message |
|
394 |
* @return None |
|
395 |
*/ |
|
396 |
void NetRadioInfoInd( const TIsiReceiveC& aIsiMessage ); |
|
397 |
||
398 |
/** |
|
399 |
* Read home network |
|
400 |
* @return Error code |
|
401 |
*/ |
|
402 |
TInt UiccCsReadReq(); |
|
403 |
||
404 |
/** |
|
405 |
* Response to read EHPLMN |
|
406 |
* @param aStatus Status |
|
407 |
* @param aFileData File data containig EHPLMN |
|
408 |
* @return None |
|
409 |
*/ |
|
410 |
void UiccCsReadEhpmlnResp( TInt aStatus, const TDesC8& aFileData ); |
|
411 |
||
412 |
/** |
|
413 |
* Response to read HPLMN |
|
414 |
* @param aStatus Status |
|
415 |
* @param aFileData File data containig HPLMN |
|
416 |
*/ |
|
417 |
void UiccCsReadHpmlnResp( TInt aStatus, const TDesC8& aFileData ); |
|
418 |
||
419 |
/** |
|
420 |
* Set network info |
|
421 |
* @param None |
|
422 |
* @return None |
|
423 |
*/ |
|
424 |
void SetSimNetworkInfo(); |
|
425 |
||
426 |
/** |
|
427 |
* GPDS radio activity indication. |
|
428 |
* @param const TIsiReceiveC& aIsiMessage: Received ISI message |
|
429 |
* @return None |
|
430 |
*/ |
|
431 |
void GpdsRadioActivityInd( const TIsiReceiveC& aIsiMessage ); |
|
432 |
||
433 |
/** |
|
434 |
* GPDS Context Deactivate indication. |
|
435 |
* @param const TIsiReceiveC& aIsiMessage: Received ISI message |
|
436 |
* @return None |
|
437 |
*/ |
|
438 |
void GpdsContextDeactivateInd( const TIsiReceiveC& aIsiMessage ); |
|
439 |
||
440 |
/** |
|
441 |
* Completes IPC EMobilePhoneGetHomeNetwork. |
|
442 |
*/ |
|
443 |
void CompleteMobilePhoneGetHomeNetwork(); |
|
444 |
||
445 |
/** |
|
446 |
* Queue functionality for NET_MODEM_REG_STATUS_IND, |
|
447 |
* NET_MODEM_REG_STATUS_GET_RESP and NET_SET_RESP ISI-messages. |
|
448 |
* @param TIsiReceiveC& aIsiMessage: Received ISI message |
|
449 |
* @return None |
|
450 |
*/ |
|
451 |
void QueueNetModemRegStatusMessagesL( const TIsiReceiveC& aIsiMessage ); |
|
452 |
||
453 |
/** |
|
454 |
* Start handling queued messages. |
|
455 |
* @return None |
|
456 |
*/ |
|
457 |
void StartHandlingNetModemRegStatusMessages(); |
|
458 |
||
459 |
/** |
|
460 |
* Finds offset to NET_GSM_REG_INFO or NET_CURRENT_CELL_INFO |
|
461 |
* in NET_REG_STATUS_IND, NET_SET_RESP or NET_REG_STATUS_GET_RESP |
|
462 |
* @param aIsiMessage ISI-message to process |
|
463 |
* @param aSbOffset resulting offset to the subblock |
|
464 |
* @return TInt KErrNone or system-wide error |
|
465 |
*/ |
|
466 |
TInt FindOperatorInfoSubBlock( |
|
467 |
const TIsiReceiveC& aIsiMessage, |
|
468 |
TUint& aSbOffset |
|
469 |
) const; |
|
470 |
||
471 |
/** |
|
472 |
* Extracts network registration status from NET_REG_INFO_COMMON |
|
473 |
* subblock of NET_REG_STATUS_IND, NET_SET_RESP or |
|
474 |
* NET_REG_STATUS_GET_RESP. |
|
475 |
* @param aIsiMessage ISI-message to process |
|
476 |
* @param aOperatorCode BCD-string containing operator code |
|
477 |
* @param aRegistrationStatus resulting registration status |
|
478 |
* @param aSbStartOffset NET_REG_INFO_COMMON subblock offset |
|
479 |
* @return TInt KErrNone or system-wide error |
|
480 |
*/ |
|
481 |
TInt ExtractNetworkRegistrationStatus( |
|
482 |
const TIsiReceiveC& aIsiMessage, |
|
483 |
const TDesC8& aOperatorCode, |
|
484 |
TUint8& aRegistrationStatus, |
|
485 |
TUint& aSbStartOffset |
|
486 |
) const; |
|
487 |
||
488 |
protected: // Constructors and destructor |
|
489 |
||
490 |
/** |
|
491 |
* C++ default constructor. |
|
492 |
*/ |
|
493 |
CMmNetMessHandler(); |
|
494 |
||
495 |
protected: // Functions |
|
496 |
||
497 |
/** |
|
498 |
* Breaks a NET_RAT_IND ISI-message. |
|
499 |
* @param const TIsiReceiveC& aIsiMessage: Received ISI message |
|
500 |
* @return None |
|
501 |
*/ |
|
502 |
void NetRatInd( const TIsiReceiveC& aIsiMessage ); |
|
503 |
||
504 |
// NETWORK UTILITY FUNCTIONS |
|
505 |
/** |
|
506 |
* Maps the isa network registration status to Symbian values. |
|
507 |
* @param TUint8 aISARegistrationStatus: Network registration status. |
|
508 |
* @param TMobilePhoneRegistrationStatus aRegStatus: Phone registration |
|
509 |
* status. |
|
510 |
* @param TMobilePhoneNetworkStatus aNWStatus: Phone network status. |
|
511 |
* @return None |
|
512 |
*/ |
|
513 |
static void MapNWAndRegStatus( |
|
514 |
TUint8 aISARegistrationStatus, |
|
515 |
RMobilePhone::TMobilePhoneRegistrationStatus& aRegStatus, |
|
516 |
RMobilePhone::TMobilePhoneNetworkStatus& aNWStatus ); |
|
517 |
||
518 |
/** |
|
519 |
* Maps the isa network selection mode to Symbian values. |
|
520 |
* @param TUInt8 aISASelectionMode: Network selection mode. |
|
521 |
* @param TMobilePhoneNetworkSelectionV1 aSelectionMode: |
|
522 |
* Network selection mode. |
|
523 |
* @return None |
|
524 |
*/ |
|
525 |
static void MapNWSelectionMode( |
|
526 |
TUint8 aISASelectionMode, |
|
527 |
RMobilePhone::TMobilePhoneNetworkSelectionV1& aSelectionMode ); |
|
528 |
||
529 |
private: // Data |
|
530 |
||
531 |
// Pointer to the NetOperatorNameHandler. |
|
532 |
CMmNetOperatorNameHandler* iNetOperatorNameHandler; |
|
533 |
||
534 |
// Pointer to the Message Router |
|
535 |
CMmMessageRouter* iMessageRouter; |
|
536 |
||
537 |
// Cached network selection method |
|
538 |
TUint8 iSelectionMethod; |
|
539 |
||
540 |
// Wether the network selection cancel has been issued or not |
|
541 |
TBool iSelectNetworkCancelIssued; |
|
542 |
||
543 |
// Wether the network search cancel has been issued or not |
|
544 |
TBool iSearchNetworkCancelIssued; |
|
545 |
||
546 |
// Network mode: ENetworkModeGsm, ENetworkModeWcdma or |
|
547 |
// ENetworkModeUnknown |
|
548 |
RMobilePhone::TMobilePhoneNetworkMode iNetworkMode; |
|
549 |
||
550 |
// If PIN code needs to be verified before IMSI can be used. |
|
551 |
TBool iImsPinVerifyRequired; |
|
552 |
||
553 |
// If ISIM application is used |
|
554 |
TBool iIsimUsed; |
|
555 |
||
556 |
// MNC lenght |
|
557 |
TUint8 iMNClength; |
|
558 |
||
559 |
// Home PLMN |
|
560 |
TBuf8<4> iHplmn; |
|
561 |
||
562 |
// Network access technology |
|
563 |
RMobilePhone::TMobilePhoneNetworkAccess iNetworkAccess; |
|
564 |
||
565 |
// Radio Resource Control (RRC) is in Cell_DCH state (there is |
|
566 |
// no cell/location info available while in this state) |
|
567 |
TBool iCell_DCH; |
|
568 |
||
569 |
// Packet transfer state (there is |
|
570 |
// no cell/location info available while in this state) |
|
571 |
TBool iPacketTransfer; |
|
572 |
||
573 |
// Delay timer for completion of Packet transfer state |
|
574 |
CDelayTimer* iDelayTimer; |
|
575 |
||
576 |
// Network and location information have to be saved while RRC is |
|
577 |
// (temporarily) in Cell_DCH state |
|
578 |
RMobilePhone::TMobilePhoneNetworkInfoV5 iLastNWInfo; |
|
579 |
RMobilePhone::TMobilePhoneLocationAreaV1 iLastLocInfo; |
|
580 |
||
581 |
// Home network information have to be saved while operator name |
|
582 |
// is requested from the NET Server. |
|
583 |
RMobilePhone::TMobilePhoneNetworkInfoV5 iHomeInfo; |
|
584 |
||
585 |
// Is NET_MODEM_REG_STATUS_IND, NET_MODEM_REG_STATUS_GET_RESP or |
|
586 |
// NET_SET_RESP message handling ongoing. |
|
587 |
TBool iNetMessageHandlingOngoing; |
|
588 |
||
589 |
// Array for queueing NET_MODEM_REG_STATUS_IND, |
|
590 |
// NET_MODEM_REG_STATUS_GET_RESP and NET_SET_RESP messages. |
|
591 |
RPointerArray<HBufC8> iNetMessageQueue; |
|
592 |
||
8
6295dc2169f3
New release based on our 2010wk15 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
5
diff
changeset
|
593 |
// For storing latest received NET_MODEM_REG_STATUS_IND |
6295dc2169f3
New release based on our 2010wk15 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
5
diff
changeset
|
594 |
HBufC8* iLastNetModemRegStatusInd; |
6295dc2169f3
New release based on our 2010wk15 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
5
diff
changeset
|
595 |
|
0 | 596 |
protected: // Data |
597 |
||
598 |
// Pointer to the PhonetSender |
|
599 |
CMmPhoNetSender* iPhoNetSender; |
|
600 |
||
601 |
// Pointer to UICC message handler |
|
602 |
CMmUiccMessHandler* iMmUiccMessHandler; |
|
603 |
}; |
|
604 |
||
605 |
/** |
|
606 |
* CDelayTimer: Used for delaying for completion of Packet transfer state |
|
607 |
* from GPDS_RADIO_AVTIVITY_IND. |
|
608 |
*/ |
|
609 |
class CDelayTimer : public CTimer |
|
610 |
{ |
|
611 |
||
612 |
public: // Constructors and destructors |
|
613 |
||
614 |
/** |
|
615 |
* Two-phased constructor. |
|
616 |
* @param aNetMessHandler: Pointer to the net message handler |
|
617 |
* @return CDelayTimer object |
|
618 |
*/ |
|
619 |
static CDelayTimer* NewL( CMmNetMessHandler* aNetMessHandler ); |
|
620 |
||
621 |
/** |
|
622 |
* ~CDelayTimer. |
|
623 |
* Destructor. |
|
624 |
*/ |
|
625 |
~CDelayTimer(); |
|
626 |
||
627 |
private: // Constructors and destructors |
|
628 |
||
629 |
/** |
|
630 |
* C++ default constructor. |
|
631 |
*/ |
|
632 |
CDelayTimer(); |
|
633 |
||
634 |
/** |
|
635 |
* 2nd phase constructor. |
|
636 |
*/ |
|
637 |
void ConstructL(); |
|
638 |
||
639 |
private: // Functions from base classes |
|
640 |
||
641 |
/** |
|
642 |
* From CActive. |
|
643 |
* Called when operation completes. |
|
644 |
*/ |
|
645 |
void RunL(); |
|
646 |
||
647 |
/** |
|
648 |
* From CActive. |
|
649 |
* Called when operation is cancelled. |
|
650 |
*/ |
|
651 |
void DoCancel(); |
|
652 |
||
653 |
public: // New functions |
|
654 |
||
655 |
/** |
|
656 |
* Start delay timer. |
|
657 |
* @param aNewPacketTransferState: New packet transfer state |
|
658 |
* @param aTimeOut: Time out in ms |
|
659 |
*/ |
|
660 |
void StartDelayTimer( |
|
661 |
TBool aNewPacketTransferState, |
|
662 |
TInt aTimeOut ); |
|
663 |
||
664 |
private: // Data |
|
665 |
||
666 |
/** |
|
667 |
* pointer to the net message handler |
|
668 |
*/ |
|
669 |
CMmNetMessHandler* iNetMessHandler; |
|
670 |
||
671 |
/** |
|
672 |
* new packet transfer state |
|
673 |
*/ |
|
674 |
TBool iNewPacketTransferState; |
|
675 |
||
676 |
}; |
|
677 |
||
678 |
#endif // CMMNETMESSHANDLER_H |
|
679 |
||
680 |
// End of File |