24 #include <e32base.h> // Symbian base types |
24 #include <e32base.h> // Symbian base types |
25 #include <etelmm.h> // Symbian Etel related types |
25 #include <etelmm.h> // Symbian Etel related types |
26 #include <ctsy/rmmcustomapi.h> |
26 #include <ctsy/rmmcustomapi.h> |
27 |
27 |
28 #include "cmmnetmesshandler.h" |
28 #include "cmmnetmesshandler.h" |
|
29 #include "muiccoperationbase.h" |
|
30 #include "cmmuiccmesshandler.h" |
29 |
31 |
30 // CONSTANTS |
32 // CONSTANTS |
31 // Max length of Operator Name String (ONS name). |
33 // Max length of Operator Name String (ONS name). |
32 const TUint8 KOnsNameMaxLength = 0x19; |
34 const TUint8 KOnsNameMaxLength = 0x19; |
33 // Display tag max length. |
35 // Display tag max length. |
63 //None |
65 //None |
64 |
66 |
65 // FORWARD DECLARATIONS |
67 // FORWARD DECLARATIONS |
66 class TIsiReceiveC; |
68 class TIsiReceiveC; |
67 class TIsiSubBlock; |
69 class TIsiSubBlock; |
|
70 class CMmUiccMessHandler; |
68 |
71 |
69 // CLASS DECLARATION |
72 // CLASS DECLARATION |
70 |
73 |
71 /** |
74 /** |
72 * Used for creating and sending Operator name handling specific |
75 * Used for creating and sending Operator name handling specific |
73 * ISI messages to PhoNet via PhoNetSender. It also receives |
76 * ISI messages to PhoNet via PhoNetSender. It also receives |
74 * Operator name handling specific ISI messages from PhoNetReceiver. |
77 * Operator name handling specific ISI messages from PhoNetReceiver. |
75 */ |
78 */ |
76 class CMmNetOperatorNameHandler : public CBase |
79 class CMmNetOperatorNameHandler : public CBase, public MUiccOperationBase |
77 { |
80 { |
78 public: // Constructors and destructor |
81 public: // Constructors and destructor |
79 |
82 |
80 /** |
83 /** |
81 * Two-phased constructor. |
84 * Two-phased constructor. |
82 * @param aNetMessHandler: Pointer to the NetMessHandler. |
85 * @param aNetMessHandler: Pointer to the NetMessHandler. |
|
86 * @param aUiccMessHandler: Pointer to the UiccMessHandler. |
83 * @return created message handler object. |
87 * @return created message handler object. |
84 */ |
88 */ |
85 static CMmNetOperatorNameHandler* NewL( |
89 static CMmNetOperatorNameHandler* NewL( |
86 CMmNetMessHandler* aNetMessHandler ); |
90 CMmNetMessHandler* aNetMessHandler, |
|
91 CMmUiccMessHandler* aUiccMessHandler ); |
87 |
92 |
88 /** |
93 /** |
89 * Destructor. |
94 * Destructor. |
90 */ |
95 */ |
91 ~CMmNetOperatorNameHandler(); |
96 ~CMmNetOperatorNameHandler(); |
137 * @return None. |
142 * @return None. |
138 */ |
143 */ |
139 void InfoPpReadResp( const TIsiReceiveC& aIsiMessage ); |
144 void InfoPpReadResp( const TIsiReceiveC& aIsiMessage ); |
140 |
145 |
141 /** |
146 /** |
142 * Creates a SIM_OPERATOR_REQ ISI message with service type |
|
143 * SIM_ST_READ_PNN and sends it to phonet. |
|
144 * Used to read the PLMN Network Name from EFpnn on (U)SIM. |
|
145 * @param aPnnIdentifier is identifier of the record to be read. |
|
146 */ |
|
147 void SimOperatorReqReadPnn( TUint8 aPnnIdentifier ); |
|
148 |
|
149 /** |
|
150 * Breaks a SIM_OPERATOR_RESP ISI message with service type |
|
151 * SIM_ST_READ_PNN. |
|
152 * @param const TIsiReceiveC& aIsiMessage: The received ISI message. |
|
153 */ |
|
154 void SimOperatorRespReadPnnL( const TIsiReceiveC& aIsiMessage ); |
|
155 |
|
156 /** |
|
157 * Creates a PERM_PM_RECORD_WRITE_REQ ISI message and sends |
147 * Creates a PERM_PM_RECORD_WRITE_REQ ISI message and sends |
158 * it to phonet. |
148 * it to phonet. |
159 * Used to Write record for PMM. |
149 * Used to Write record for PMM. |
160 */ |
150 */ |
161 void PermPmRecordWriteReq(); |
151 void PermPmRecordWriteReq(); |
182 /** |
172 /** |
183 * PNN record identifier value. |
173 * PNN record identifier value. |
184 * @return PNN record identifier value. |
174 * @return PNN record identifier value. |
185 */ |
175 */ |
186 TInt GetPnnRecordIdentifierValue(); |
176 TInt GetPnnRecordIdentifierValue(); |
|
177 |
|
178 /** |
|
179 * Creates a UICC_APPL_CMD_REQ ISI message with service type |
|
180 * UICC_APPL_FILE_INFO and sends it to phonet. |
|
181 * Used to read the record count of EFopl on (U)SIM. |
|
182 */ |
|
183 void UiccReadOplRecordCount(); |
|
184 |
|
185 /** |
|
186 * Handle UICC response messages |
|
187 * @param aTraId Transaction ID |
|
188 * @param aStatus Status |
|
189 * @param aFileData File data from (U)SIM |
|
190 * @return KErrNone or error code |
|
191 */ |
|
192 TInt ProcessUiccMsg( |
|
193 TInt aTraId, |
|
194 TInt aStatus, |
|
195 TUint8 aDetails, |
|
196 const TDesC8& aFileData ); |
|
197 |
|
198 /** |
|
199 * Read operator name from (U)SIM |
|
200 * @return None |
|
201 */ |
|
202 void UiccOperatorReq(); |
|
203 |
|
204 /** |
|
205 * Creates a UICC_APPL_CMD_REQ ISI message and sends it to phonet. |
|
206 * Used to read the PLMN Network Name from EFpnn on (U)SIM. |
|
207 * @param aPnnIdentifier is identifier of the record to be read. |
|
208 * @return None. |
|
209 */ |
|
210 void UiccOperatorReqReadPnn( TUint8 aPnnIdentifier ); |
|
211 |
187 |
212 |
188 private: // Constructors and destructor |
213 private: // Constructors and destructor |
189 |
214 |
190 /** |
215 /** |
191 * 2nd phase constructor |
216 * 2nd phase constructor |
318 |
343 |
319 /** |
344 /** |
320 * Completes IPC EMobilePhoneGetDetectedNetworksV2Phase1. |
345 * Completes IPC EMobilePhoneGetDetectedNetworksV2Phase1. |
321 */ |
346 */ |
322 void CompleteMobilePhoneGetDetectedNetworksV2Phase1L(); |
347 void CompleteMobilePhoneGetDetectedNetworksV2Phase1L(); |
|
348 |
|
349 /** |
|
350 * Response handling for EFopl record count |
|
351 * @param aStatus Status |
|
352 * @param aFileData FCI data containig recored count |
|
353 * @return void |
|
354 */ |
|
355 void UiccOplRecordCountResponse( |
|
356 TInt aStatus, |
|
357 const TDesC8& aFileData ); |
|
358 |
|
359 /** |
|
360 * Request to read a record from EFopl |
|
361 * @return void |
|
362 */ |
|
363 void UiccReadOplReq(); |
|
364 |
|
365 /** |
|
366 * Response handling for received EFopl record |
|
367 * @param aFileData File data |
|
368 * @return void |
|
369 */ |
|
370 void UiccReadOplResp( const TDesC8& aFileData ); |
|
371 |
|
372 /** |
|
373 * Response handling for operator name |
|
374 * @param aStatus Status |
|
375 * @param aFileData File data |
|
376 * @return void |
|
377 */ |
|
378 void UiccOperatorResp( TInt aStatus, const TDesC8& aFileData ); |
|
379 |
|
380 /** |
|
381 * Request to read EFpnn from (U)SIM |
|
382 * @param aMCC is current Mobile Country Code. |
|
383 * @param aMNC is current Mobile Network Code. |
|
384 * @param aPnnIdentifier is PNN record identifier. |
|
385 * @param aLocationAreaData is current LAC data. |
|
386 * @param aNetworkData is Network data. |
|
387 * @return None. |
|
388 */ |
|
389 void SendReadPnnReq( |
|
390 TUint aMCC, |
|
391 TUint aMNC, |
|
392 TUint8 aPnnIdentifier, |
|
393 const RMobilePhone::TMobilePhoneLocationAreaV1& aLocationAreaData, |
|
394 const RMobilePhone::TMobilePhoneNetworkInfoV5& aNetworkData ); |
|
395 |
|
396 |
|
397 /** |
|
398 * Response handling for PLMN Network Name (EFpnn) |
|
399 * @param aStatus Status |
|
400 * @param aFileData File data |
|
401 * @return None. |
|
402 */ |
|
403 void UiccOperatorRespReadPnnL( TInt aStatus, const TDesC8& aFileData ); |
|
404 |
323 |
405 |
324 protected: // Constructors and destructor |
406 protected: // Constructors and destructor |
325 |
407 |
326 /** |
408 /** |
327 * C++ default constructor. |
409 * C++ default constructor. |
380 private: // Data |
462 private: // Data |
381 |
463 |
382 // Pointer to the NetMessHandler. |
464 // Pointer to the NetMessHandler. |
383 CMmNetMessHandler* iNetMessHandler; |
465 CMmNetMessHandler* iNetMessHandler; |
384 |
466 |
|
467 // Pointer to UICC message handler |
|
468 CMmUiccMessHandler* iMmUiccMessHandler; |
|
469 |
385 // Storing Location Area data for later use. |
470 // Storing Location Area data for later use. |
386 RMobilePhone::TMobilePhoneLocationAreaV1 iLocationAreaData; |
471 RMobilePhone::TMobilePhoneLocationAreaV1 iLocationAreaData; |
387 // Storing Network data for later use. |
472 // Storing Network data for later use. |
388 RMobilePhone::TMobilePhoneNetworkInfoV5 iNetworkData; |
473 RMobilePhone::TMobilePhoneNetworkInfoV5 iNetworkData; |
389 |
474 |
432 RArray<RMobilePhone::TMobilePhoneNetworkInfoV5> iManualSearchNetworkList; |
517 RArray<RMobilePhone::TMobilePhoneNetworkInfoV5> iManualSearchNetworkList; |
433 |
518 |
434 // Manual search data list array. |
519 // Manual search data list array. |
435 RArray<TManualSearchDataList> iManualSearchDataList; |
520 RArray<TManualSearchDataList> iManualSearchDataList; |
436 |
521 |
|
522 // Number of records in EFopl |
|
523 TInt iOplRecordCount; |
|
524 |
|
525 // Record number of EFopl |
|
526 TUint8 iOplRecordNumber; |
|
527 |
437 protected: // Data |
528 protected: // Data |
438 |
529 |
439 }; |
530 }; |
440 |
531 |
441 #endif // CMMNETOPERATORNAMEHANDLER_H |
532 #endif // CMMNETOPERATORNAMEHANDLER_H |