author | mikaruus <mika.a.ruuskanen@nokia.com> |
Thu, 14 Jan 2010 10:44:58 +0200 | |
changeset 5 | 8ccc39f9d787 |
parent 0 | 63b37f68c1ce |
child 9 | 8486d82aef45 |
permissions | -rw-r--r-- |
0 | 1 |
/* |
2 |
* Copyright (c) 2009 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: ?Description |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
||
19 |
||
20 |
// INCLUDE FILES |
|
21 |
#include "cmmuiccmesshandler.h" |
|
22 |
#include "cmmphonetsender.h" |
|
23 |
#include "tsylogger.h" |
|
24 |
#include "cmmmessagerouter.h" |
|
5
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
25 |
#include "cmmstaticutility.h" |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
26 |
#include "cmmphonemesshandler.h" |
0 | 27 |
|
28 |
#include <ctsy/serviceapi/mmtsy_ipcdefs.h> |
|
29 |
#include <e32cmn.h> |
|
30 |
#include <pn_const.h> |
|
31 |
#include <uiccisi.h> |
|
32 |
#include "OstTraceDefinitions.h" |
|
33 |
#ifdef OST_TRACE_COMPILER_IN_USE |
|
34 |
#include "cmmuiccmesshandlerTraces.h" |
|
35 |
#endif |
|
36 |
||
37 |
||
38 |
// LOCAL CONSTANTS AND MACROS |
|
39 |
const TUint8 KUiccPadding( 0 ); |
|
40 |
const TUint8 KUiccSbApplPathSize( SIZE_UICC_SB_APPL_PATH + KFilePathLength ); |
|
41 |
const TUint8 KUiccSbFileDataSize( SIZE_UICC_SB_FILE_DATA + KFileDataLength ); |
|
42 |
const TUint8 KUiccApplCmdReqOffset( ISI_HEADER_SIZE + SIZE_UICC_APPL_CMD_REQ ); |
|
43 |
const TUint8 KUiccRecordNotDefined( 0 ); |
|
44 |
const TUint16 KUiccFileIdNotDefined( 0 ); |
|
45 |
const TUint8 KUiccServiceTypeNotDefined( 0 ); |
|
46 |
const TUint8 KUiccApduReqSubblockOffset(ISI_HEADER_SIZE + SIZE_UICC_APDU_REQ); |
|
47 |
const TUint8 KUiccSbApduLengthOffset( 6 ); |
|
48 |
const TUint8 KUiccSbApduDataOffset( 8 ); |
|
49 |
const TUint16 KUiccSbApduSize( SIZE_UICC_SB_APDU + KApduDataLength ); |
|
50 |
||
51 |
||
52 |
// ============================= LOCAL FUNCTIONS =============================== |
|
53 |
||
54 |
void CMmUiccMessHandler::SendTerminalProfile() |
|
55 |
{ |
|
56 |
// Temporary for testing purposes, terminal profile sending will be moved |
|
57 |
// to SAT TSY |
|
58 |
TFLOGSTRING("TSY: CMmUiccMessHandler::SendTerminalProfile TEMPORARY SOLUTION FOR TESTING"); |
|
59 |
OstTrace0( TRACE_NORMAL, CMMUICCMESSHANDLER_SENDTERMINALPROFILE, "CMmUiccMessHandler::SendTerminalProfile TEMPORARY SOLUTION FOR TESTING" ); |
|
60 |
||
61 |
// Create UICC_CAT_TERMINAL_PROFILE message |
|
62 |
TIsiSend isiMsg( iPhoNetSender->SendBufferDes() ); |
|
63 |
isiMsg.Set8bit( ISI_HEADER_OFFSET_RESOURCEID, PN_UICC ); |
|
64 |
isiMsg.Set8bit( ISI_HEADER_SIZE, UICC_CAT_REQ_OFFSET_TRANSID ); // transaction id |
|
65 |
isiMsg.Set8bit( ISI_HEADER_SIZE + UICC_CAT_REQ_OFFSET_MESSAGEID, UICC_CAT_REQ ); |
|
66 |
isiMsg.Set8bit( ISI_HEADER_SIZE + UICC_CAT_REQ_OFFSET_SERVICETYPE, UICC_CAT_TERMINAL_PROFILE ); |
|
67 |
isiMsg.Set8bit( ISI_HEADER_SIZE + UICC_CAT_REQ_OFFSET_NSB, 1 ); // num of subblocks |
|
68 |
||
69 |
// Create subblock |
|
70 |
TBuf8<30> terminalProfileBuf( 0 ); |
|
71 |
TIsiSubBlock uiccSbTerminalProfile( |
|
72 |
terminalProfileBuf, |
|
73 |
UICC_SB_TERMINAL_PROFILE, |
|
74 |
EIsiSubBlockTypeId16Len16 ); |
|
75 |
||
76 |
// 2x filler |
|
77 |
terminalProfileBuf.Append( KUiccPadding ); |
|
78 |
terminalProfileBuf.Append( KUiccPadding ); |
|
79 |
||
80 |
// Terminal profile length (16-bit) |
|
81 |
terminalProfileBuf.Append( KUiccPadding ); |
|
82 |
terminalProfileBuf.Append( 1 ); |
|
83 |
terminalProfileBuf.Append( 0 ); |
|
84 |
||
85 |
// Append subblock to ISI message |
|
86 |
isiMsg.CopyData( |
|
87 |
ISI_HEADER_SIZE + 4, |
|
88 |
uiccSbTerminalProfile.CompleteSubBlock() ); |
|
89 |
||
90 |
iPhoNetSender->Send( isiMsg.Complete() ); |
|
91 |
} |
|
92 |
||
93 |
// ============================ MEMBER FUNCTIONS =============================== |
|
94 |
||
95 |
// ----------------------------------------------------------------------------- |
|
96 |
// TUiccParamsBase::TUiccParamsBase |
|
97 |
// Constructor |
|
98 |
// ----------------------------------------------------------------------------- |
|
99 |
// |
|
100 |
TUiccParamsBase::TUiccParamsBase() |
|
101 |
{ |
|
102 |
// Initialize data |
|
103 |
messHandlerPtr = NULL; |
|
104 |
trId = ETrIdNotDefined; |
|
105 |
fileId = KUiccFileIdNotDefined; |
|
106 |
fileIdSfi = UICC_SFI_NOT_PRESENT; |
|
107 |
serviceType = KUiccServiceTypeNotDefined; |
|
108 |
filePath.Append( KNullDesC8 ); |
|
109 |
} |
|
110 |
||
111 |
// ----------------------------------------------------------------------------- |
|
112 |
// TUiccApplFileInfo::TUiccApplFileInfo |
|
113 |
// Constructor |
|
114 |
// ----------------------------------------------------------------------------- |
|
115 |
// |
|
116 |
TUiccApplFileInfo::TUiccApplFileInfo() |
|
117 |
{ |
|
118 |
// None |
|
119 |
} |
|
120 |
||
121 |
// ----------------------------------------------------------------------------- |
|
122 |
// TUiccReadTransparent::TUiccReadTransparent |
|
123 |
// Constructor |
|
124 |
// ----------------------------------------------------------------------------- |
|
125 |
// |
|
126 |
TUiccReadTransparent::TUiccReadTransparent() |
|
127 |
{ |
|
128 |
dataOffset = 0; |
|
129 |
dataAmount = 0; |
|
130 |
} |
|
131 |
||
132 |
// ----------------------------------------------------------------------------- |
|
133 |
// TUiccWriteTransparent::TUiccWriteTransparent |
|
134 |
// Constructor |
|
135 |
// ----------------------------------------------------------------------------- |
|
136 |
// |
|
137 |
TUiccWriteTransparent::TUiccWriteTransparent() |
|
138 |
{ |
|
139 |
fileData.Append( KNullDesC8 ); |
|
140 |
} |
|
141 |
||
142 |
// ----------------------------------------------------------------------------- |
|
143 |
// TUiccReadLinearFixed::TUiccReadLinearFixed |
|
144 |
// Constructor |
|
145 |
// ----------------------------------------------------------------------------- |
|
146 |
// |
|
147 |
TUiccReadLinearFixed::TUiccReadLinearFixed() |
|
148 |
{ |
|
149 |
record = KUiccRecordNotDefined; |
|
150 |
} |
|
151 |
||
152 |
// ----------------------------------------------------------------------------- |
|
153 |
// TUiccWriteLinearFixed::TUiccWriteLinearFixed |
|
154 |
// Constructor |
|
155 |
// ----------------------------------------------------------------------------- |
|
156 |
// |
|
157 |
TUiccWriteLinearFixed::TUiccWriteLinearFixed() |
|
158 |
{ |
|
159 |
fileData.Append( KNullDesC8 ); |
|
160 |
} |
|
161 |
||
162 |
// ----------------------------------------------------------------------------- |
|
163 |
// TUiccSendApdu::TUiccSendApdu |
|
164 |
// Constructor |
|
165 |
// ----------------------------------------------------------------------------- |
|
166 |
// |
|
167 |
TUiccSendApdu::TUiccSendApdu():TUiccParamsBase() |
|
168 |
{ |
|
169 |
apdu.Append( KNullDesC8 ); |
|
170 |
} |
|
171 |
||
172 |
// ----------------------------------------------------------------------------- |
|
173 |
// TUiccParamsApduReq::TUiccParamsApduReq |
|
174 |
// Constructor |
|
175 |
// ----------------------------------------------------------------------------- |
|
176 |
// |
|
177 |
TUiccParamsApduReq::TUiccParamsApduReq():TUiccParamsBase() |
|
178 |
{ |
|
179 |
action = KUiccRecordNotDefined; |
|
180 |
apduData.Append( KNullDesC8 ); |
|
181 |
} |
|
182 |
||
183 |
// ----------------------------------------------------------------------------- |
|
184 |
// CMmUiccMessHandler::CMmUiccMessHandler |
|
185 |
// C++ default constructor can NOT contain any code, that |
|
186 |
// might leave. |
|
187 |
// ----------------------------------------------------------------------------- |
|
188 |
// |
|
189 |
CMmUiccMessHandler::CMmUiccMessHandler() |
|
190 |
{ |
|
191 |
} |
|
192 |
||
193 |
// ----------------------------------------------------------------------------- |
|
194 |
// CMmUiccMessHandler::ConstructL |
|
195 |
// Symbian 2nd phase constructor can leave. |
|
196 |
// ----------------------------------------------------------------------------- |
|
197 |
// |
|
198 |
void CMmUiccMessHandler::ConstructL( |
|
199 |
CMmPhoNetSender* aPhoNetSender, |
|
200 |
CMmPhoNetReceiver* aPhoNetReceiver) |
|
201 |
{ |
|
202 |
TFLOGSTRING("TSY: CMmUiccMessHandler::ConstructL"); |
|
203 |
OstTrace0( TRACE_NORMAL, CMMUICCMESSHANDLER_CONSTRUCTL, "CMmUiccMessHandler::ConstructL" ); |
|
204 |
||
205 |
// Reset the pointer array |
|
206 |
iMessHandlerPrtList.Reset(); |
|
207 |
iPhoNetSender = aPhoNetSender; |
|
208 |
aPhoNetReceiver->RegisterL( this, PN_UICC ); |
|
209 |
||
210 |
iCardType = UICC_CARD_TYPE_UNKNOWN; |
|
211 |
iApplicationId = UICC_APPL_ID_UNKNOWN; |
|
212 |
iApplicationType = UICC_APPL_TYPE_UNKNOWN; |
|
213 |
iApplicationStatus = UICC_STATUS_APPL_NOT_ACTIVE; |
|
214 |
iUiccServerStatus = UICC_STATUS_NOT_READY; |
|
215 |
iUiccClientId = 0; |
|
216 |
iUiccIsimClientId = 0; |
|
217 |
iIsimApplicationId = UICC_APPL_ID_UNKNOWN; |
|
218 |
iIsimApplicationStatus = UICC_STATUS_APPL_NOT_ACTIVE; |
|
219 |
iIsimApplicationFound = EFalse; |
|
5
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
220 |
iCompleteSimStatusReady = ETrue; |
0 | 221 |
iPin1Id = 0; |
222 |
iPin2Id = 0; |
|
223 |
iActivePin = RMobilePhone::ESecurityCodePin1; |
|
224 |
iAid.Zero(); |
|
225 |
||
226 |
// Initialized for USIM application |
|
227 |
iApplFileId.Append( 0x7F ); |
|
228 |
iApplFileId.Append( 0xFF ); |
|
229 |
} |
|
230 |
||
231 |
// ----------------------------------------------------------------------------- |
|
232 |
// CMmUiccMessHandler::NewL |
|
233 |
// Two-phased constructor. |
|
234 |
// ----------------------------------------------------------------------------- |
|
235 |
// |
|
236 |
CMmUiccMessHandler* CMmUiccMessHandler::NewL( |
|
237 |
CMmPhoNetSender* aPhoNetSender, |
|
238 |
CMmPhoNetReceiver* aPhoNetReceiver, |
|
239 |
CMmMessageRouter* aMessageRouter ) |
|
240 |
{ |
|
241 |
TFLOGSTRING("TSY: CMmUiccMessHandler::NewL"); |
|
242 |
OstTrace0( TRACE_NORMAL, CMMUICCMESSHANDLER_NEWL, "CMmUiccMessHandler::NewL" ); |
|
243 |
||
244 |
CMmUiccMessHandler* uiccMessHandler( new ( ELeave ) CMmUiccMessHandler() ); |
|
245 |
CleanupStack::PushL( uiccMessHandler ); |
|
246 |
uiccMessHandler->iMessageRouter = aMessageRouter; |
|
247 |
uiccMessHandler->ConstructL( aPhoNetSender, aPhoNetReceiver ); |
|
248 |
CleanupStack::Pop( uiccMessHandler ); |
|
249 |
return uiccMessHandler; |
|
250 |
} |
|
251 |
||
252 |
// ----------------------------------------------------------------------------- |
|
253 |
// CMmUiccMessHandler::~CMmUiccMessHandler() |
|
254 |
// Destructor |
|
255 |
// ----------------------------------------------------------------------------- |
|
256 |
// |
|
257 |
CMmUiccMessHandler::~CMmUiccMessHandler() |
|
258 |
{ |
|
259 |
TFLOGSTRING("TSY: CMmUiccMessHandler::~CMmUiccMessHandler"); |
|
260 |
OstTrace0( TRACE_NORMAL, CMMUICCMESSHANDLER_CMMUICCMESSHANDLER, "CMmUiccMessHandler::~CMmUiccMessHandler" ); |
|
261 |
} |
|
262 |
||
263 |
// ----------------------------------------------------------------------------- |
|
264 |
// CMmUiccMessHandler::ReceiveMessageL |
|
265 |
// Receive ISI messages from phonet |
|
266 |
// (other items were commented in a header). |
|
267 |
// ----------------------------------------------------------------------------- |
|
268 |
// |
|
269 |
void CMmUiccMessHandler::ReceiveMessageL( const TIsiReceiveC& aIsiMsg ) |
|
270 |
{ |
|
271 |
TInt status( KErrNone ); |
|
5
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
272 |
TUint8 details ( UICC_NO_DETAILS ); |
0 | 273 |
TUint8 messageId( aIsiMsg.Get8bit( ISI_HEADER_OFFSET_MESSAGEID ) ); |
274 |
TUint8 trId( aIsiMsg.Get8bit( ISI_HEADER_OFFSET_TRANSID ) ); |
|
275 |
TUint8 serviceType( 0 ); |
|
276 |
TPtrC8 fileData; |
|
277 |
||
278 |
TFLOGSTRING3("TSY: CMmUiccMessHandler::ReceiveMessageL, message ID :0x%x, transaction ID: %d", messageId, trId ); |
|
279 |
OstTraceExt2( TRACE_NORMAL, CMMUICCMESSHANDLER_RECEIVEMESSAGEL, "CMmUiccMessHandler::ReceiveMessageL;messageId=%hhx;trId=%hhu", messageId, trId ); |
|
280 |
||
281 |
// Get the correct message handler for this operation |
|
282 |
MUiccOperationBase* messHandler( iMessHandlerPrtList.At( trId ) ); |
|
283 |
||
284 |
switch( messageId ) |
|
285 |
{ |
|
286 |
case UICC_CAT_IND: |
|
287 |
{ |
|
288 |
// Send terminal profile ( to be moved to SAT TSY later ) |
|
289 |
SendTerminalProfile(); |
|
290 |
break; |
|
291 |
} |
|
292 |
case UICC_CAT_RESP: |
|
293 |
{ |
|
294 |
// To be moved to SAT TSY later |
|
295 |
break; |
|
296 |
} |
|
297 |
case UICC_CARD_IND: |
|
298 |
{ |
|
299 |
serviceType = aIsiMsg.Get8bit( |
|
300 |
ISI_HEADER_SIZE + UICC_CARD_IND_OFFSET_SERVICETYPE ); |
|
301 |
// Start application activation procedure if the card is ready and |
|
302 |
// the application is not active yet |
|
303 |
if ( UICC_CARD_READY == serviceType && |
|
304 |
UICC_STATUS_APPL_ACTIVE != iApplicationStatus ) |
|
305 |
{ |
|
306 |
TUiccParamsBase params; |
|
307 |
params.messHandlerPtr = static_cast<MUiccOperationBase*>( this ); |
|
308 |
params.trId = ETrIdGetUiccApplication; |
|
309 |
CreateUiccApplicationReq( params, UICC_APPL_LIST ); |
|
310 |
} |
|
311 |
// No else. Application was active already |
|
312 |
break; |
|
313 |
} |
|
314 |
case UICC_RESP: |
|
315 |
{ |
|
316 |
iUiccServerStatus = HandleUiccResp( aIsiMsg ); |
|
317 |
// Start application activation procedure if the card is ready and |
|
318 |
// the application is not active yet |
|
319 |
if ( UICC_STATUS_START_UP_COMPLETED == iUiccServerStatus && |
|
320 |
UICC_STATUS_APPL_ACTIVE != iApplicationStatus) |
|
321 |
{ |
|
322 |
// Read the application ID |
|
323 |
TUiccParamsBase params; |
|
324 |
params.messHandlerPtr = static_cast<MUiccOperationBase*>( this ); |
|
325 |
params.trId = ETrIdGetUiccApplication; |
|
326 |
CreateUiccApplicationReq( params, UICC_APPL_LIST ); |
|
327 |
} |
|
328 |
break; |
|
329 |
} |
|
330 |
case UICC_APPLICATION_RESP: |
|
331 |
{ |
|
332 |
status = HandleUiccApplicationResp( aIsiMsg ); |
|
333 |
break; |
|
334 |
} |
|
335 |
case UICC_APPLICATION_IND: |
|
336 |
{ |
|
337 |
TInt8 serviceType( aIsiMsg.Get8bit( |
|
338 |
ISI_HEADER_SIZE + UICC_APPLICATION_IND_OFFSET_SERVICETYPE ) ); |
|
339 |
||
340 |
iApplicationStatus = UICC_STATUS_APPL_ACTIVE; |
|
341 |
// Application activation indication with service type |
|
342 |
// UICC_APPL_ACTIVATED, as part of PowerOnSim sequence. |
|
343 |
// Transaction id is set to ETrIdSimPowerOn and operation |
|
344 |
// is added to list and flag is disabled. |
|
345 |
if( UICC_APPL_ACTIVATED == serviceType ) |
|
346 |
{ |
|
347 |
iDoNotRemoveTransactionID = EFalse; |
|
348 |
status = KErrNone; |
|
349 |
trId = ETrIdSimPowerOn; |
|
350 |
messHandler = iMessHandlerPrtList.At( trId ); |
|
351 |
} |
|
352 |
break; |
|
353 |
} |
|
354 |
case UICC_APPL_CMD_RESP: |
|
355 |
{ |
|
356 |
status = aIsiMsg.Get8bit( |
|
357 |
ISI_HEADER_SIZE + UICC_APPL_CMD_RESP_OFFSET_STATUS ); |
|
5
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
358 |
|
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
359 |
details = aIsiMsg.Get8bit( |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
360 |
ISI_HEADER_SIZE + UICC_APPL_CMD_RESP_OFFSET_DETAILS ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
361 |
|
0 | 362 |
TInt8 serviceType( aIsiMsg.Get8bit( |
363 |
ISI_HEADER_SIZE + UICC_APPL_CMD_RESP_OFFSET_SERVICETYPE ) ); |
|
364 |
||
365 |
if ( UICC_STATUS_OK == status ) |
|
366 |
{ |
|
367 |
// If READ operation was required, read data from subblock |
|
368 |
if ( UICC_APPL_READ_TRANSPARENT == serviceType || |
|
369 |
UICC_APPL_READ_LINEAR_FIXED == serviceType ) |
|
370 |
{ |
|
371 |
fileData.Set( GetFileData( aIsiMsg ) ); |
|
372 |
} |
|
373 |
if ( UICC_APPL_FILE_INFO == serviceType ) |
|
374 |
{ |
|
375 |
fileData.Set( GetFileFCI( aIsiMsg ) ); |
|
376 |
} |
|
377 |
if ( UICC_APPL_APDU_SEND == serviceType ) |
|
378 |
{ |
|
379 |
fileData.Set( GetApduData( aIsiMsg ) ); |
|
380 |
} |
|
381 |
} |
|
382 |
else |
|
383 |
{ |
|
384 |
TFLOGSTRING2("TSY: CMmUiccMessHandler::ReceiveMessageL, case UICC_APPL_CMD_RESP, status: %d", status ); |
|
385 |
OstTraceExt1( TRACE_NORMAL, DUP1_CMMUICCMESSHANDLER_RECEIVEMESSAGEL, "CMmUiccMessHandler::ReceiveMessageL, case UICC_APPL_CMD_RESP;status=%hhu", status ); |
|
386 |
} |
|
387 |
break; |
|
388 |
} |
|
389 |
case UICC_APDU_RESP: |
|
390 |
{ |
|
391 |
status = aIsiMsg.Get8bit( |
|
392 |
ISI_HEADER_SIZE + UICC_APDU_RESP_OFFSET_STATUS ); |
|
393 |
TInt8 serviceType( aIsiMsg.Get8bit( |
|
394 |
ISI_HEADER_SIZE + UICC_APDU_RESP_OFFSET_SERVICETYPE ) ); |
|
395 |
||
396 |
// Extract actual APDU from SB_APDU |
|
397 |
if( UICC_STATUS_OK == status ) |
|
398 |
{ |
|
399 |
if( UICC_APDU_ATR_GET == serviceType |
|
400 |
|| UICC_APDU_SEND == serviceType ) |
|
401 |
{ |
|
402 |
fileData.Set( GetApduData( aIsiMsg ) ); |
|
403 |
} |
|
404 |
} |
|
405 |
break; |
|
406 |
} |
|
407 |
case UICC_APDU_RESET_IND: |
|
408 |
{ |
|
409 |
TInt8 serviceType( aIsiMsg.Get8bit( |
|
410 |
ISI_HEADER_SIZE + UICC_APDU_RESET_IND_OFFSET_SERVICETYPE ) ); |
|
411 |
||
412 |
// Indication that SAP APDU interface is activated |
|
413 |
if( UICC_READY == serviceType ) |
|
414 |
{ |
|
415 |
// Disable flag |
|
416 |
iDoNotRemoveTransactionID = EFalse; |
|
417 |
status = KErrNone; |
|
418 |
} |
|
419 |
break; |
|
420 |
} |
|
421 |
case UICC_CONNECTOR_RESP: |
|
422 |
{ |
|
423 |
status = aIsiMsg.Get8bit( |
|
424 |
ISI_HEADER_SIZE + UICC_CONNECTOR_RESP_OFFSET_STATUS ); |
|
425 |
} |
|
426 |
break; |
|
427 |
case UICC_CARD_RESP: |
|
428 |
{ |
|
429 |
status = aIsiMsg.Get8bit( |
|
430 |
ISI_HEADER_SIZE + UICC_CARD_RESP_OFFSET_STATUS ); |
|
431 |
TUint8 serviceType( aIsiMsg.Get8bit( |
|
432 |
ISI_HEADER_SIZE + UICC_CARD_RESP_OFFSET_SERVICETYPE ) ); |
|
433 |
||
434 |
if( UICC_STATUS_OK == status |
|
435 |
&& UICC_CARD_STATUS_GET == serviceType ) |
|
436 |
{ |
|
437 |
// File data from SIZE_UICC_SB_CARD_STATUS |
|
438 |
TUint uiccSbFileDataOffset( 0 ); |
|
439 |
TInt cardStatusFieldLength( 1 ); |
|
440 |
||
441 |
if ( KErrNone == aIsiMsg.FindSubBlockOffsetById( |
|
442 |
ISI_HEADER_SIZE + SIZE_UICC_CARD_RESP, |
|
443 |
UICC_SB_CARD_STATUS, |
|
444 |
EIsiSubBlockTypeId16Len16, |
|
445 |
uiccSbFileDataOffset ) ) |
|
446 |
{ |
|
447 |
fileData.Set(aIsiMsg.GetData( |
|
448 |
uiccSbFileDataOffset + |
|
449 |
UICC_SB_CARD_STATUS_OFFSET_CARDSTATUS, |
|
450 |
cardStatusFieldLength) ); |
|
451 |
} |
|
452 |
} |
|
453 |
} |
|
454 |
break; |
|
455 |
default: |
|
456 |
{ |
|
457 |
TFLOGSTRING("TSY: CMmUiccMessHandler::ReceiveMessageL, default" ); |
|
458 |
OstTrace0( TRACE_NORMAL, DUP2_CMMUICCMESSHANDLER_RECEIVEMESSAGEL, "CMmUiccMessHandler::ReceiveMessageL, default" ); |
|
459 |
break; |
|
460 |
} |
|
461 |
} |
|
462 |
||
463 |
if ( NULL != messHandler ) |
|
464 |
{ |
|
465 |
if( !iDoNotRemoveTransactionID ) |
|
466 |
{ |
|
467 |
iMessHandlerPrtList[trId] = NULL; |
|
468 |
} |
|
5
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
469 |
messHandler->ProcessUiccMsg( trId, status, details, fileData ); |
0 | 470 |
} |
471 |
else |
|
472 |
{ |
|
473 |
TFLOGSTRING("TSY: CMmUiccMessHandler::ReceiveMessageL, message handler not found -> no further handling of this message" ); |
|
474 |
OstTrace0( TRACE_NORMAL, DUP3_CMMUICCMESSHANDLER_RECEIVEMESSAGEL, "CMmUiccMessHandler::ReceiveMessageL, message handler not found -> no further handling of this message" ); |
|
475 |
} |
|
476 |
} |
|
477 |
||
478 |
// ----------------------------------------------------------------------------- |
|
479 |
// CMmUiccMessHandler::CreateUiccApplCmdReq |
|
480 |
// (other items were commented in a header). |
|
481 |
// ----------------------------------------------------------------------------- |
|
482 |
// |
|
483 |
TInt CMmUiccMessHandler::CreateUiccApplCmdReq( |
|
484 |
const TUiccParamsBase& aParams, |
|
485 |
const TUint8 aApplType ) |
|
486 |
{ |
|
487 |
TInt ret( KErrNone ); |
|
488 |
TInt trId( aParams.trId ); |
|
489 |
TInt8 serviceType( aParams.serviceType ); |
|
490 |
TUint8 numOfSubblocks( 0 ); |
|
491 |
TUint8 sizeOfApplPathSubblock( 0 ); |
|
492 |
||
493 |
TFLOGSTRING2("TSY: CMmUiccMessHandler::CreateUiccApplCmdReq, transaction ID: %d", trId ); |
|
494 |
OstTrace1( TRACE_NORMAL, CMMUICCMESSHANDLER_CREATEUICCAPPLCMDREQ, "CMmUiccMessHandler::CreateUiccApplCmdReq;trId=%d", trId ); |
|
495 |
||
496 |
TUint8 applId( aApplType == UICC_APPL_TYPE_UICC_ISIM ? |
|
497 |
iIsimApplicationId : iApplicationId ); |
|
498 |
||
499 |
// If there is the previous request ongoing (pointer was already set for |
|
500 |
// this operation) we can't handle this request. |
|
501 |
if ( NULL == iMessHandlerPrtList.At( trId ) ) |
|
502 |
{ |
|
503 |
// Save pointer to message handler, it is needed when receiving |
|
504 |
// respone for this operation |
|
505 |
iMessHandlerPrtList[trId] = aParams.messHandlerPtr; |
|
506 |
// Create UICC_APPL_CMD_REQ message |
|
507 |
TIsiSend isiMsg( iPhoNetSender->SendBufferDes() ); |
|
508 |
isiMsg.Set8bit( ISI_HEADER_OFFSET_RESOURCEID, PN_UICC ); |
|
509 |
isiMsg.Set8bit( |
|
510 |
ISI_HEADER_SIZE + UICC_APPL_CMD_REQ_OFFSET_TRANSID, |
|
511 |
trId ); |
|
512 |
isiMsg.Set8bit( |
|
513 |
ISI_HEADER_SIZE + UICC_APPL_CMD_REQ_OFFSET_MESSAGEID, |
|
514 |
UICC_APPL_CMD_REQ ); |
|
515 |
isiMsg.Set8bit( |
|
516 |
ISI_HEADER_SIZE + UICC_APPL_CMD_REQ_OFFSET_SERVICETYPE, |
|
517 |
serviceType ); |
|
518 |
isiMsg.Set8bit( |
|
519 |
ISI_HEADER_SIZE + UICC_APPL_CMD_REQ_OFFSET_APPLID, |
|
520 |
applId ); |
|
521 |
isiMsg.Set8bit( |
|
522 |
ISI_HEADER_SIZE + UICC_APPL_CMD_REQ_OFFSET_SESSIONID, |
|
523 |
UICC_SESSION_ID_NOT_USED ); |
|
524 |
isiMsg.Set16bit( |
|
525 |
ISI_HEADER_SIZE + UICC_APPL_CMD_REQ_OFFSET_FILLERBYTE1, |
|
526 |
KUiccPadding ); |
|
527 |
||
528 |
switch ( serviceType ) |
|
529 |
{ |
|
530 |
case UICC_APPL_READ_TRANSPARENT: |
|
531 |
{ |
|
532 |
numOfSubblocks = 3; |
|
533 |
// Create and append UICC_SB_CLIENT |
|
534 |
CreateUiccSbClient( isiMsg, KUiccApplCmdReqOffset ); |
|
535 |
// Create and append UICC_SB_TRANSPARENT |
|
536 |
CreateUiccSbTransparent( |
|
537 |
static_cast <const TUiccReadTransparent&>( aParams ), |
|
538 |
isiMsg, |
|
539 |
KUiccApplCmdReqOffset + SIZE_UICC_SB_CLIENT ); |
|
540 |
// Create and append UICC_SB_APPL_PATH |
|
541 |
CreateUiccSbApplPath( |
|
542 |
aParams, |
|
543 |
isiMsg, |
|
544 |
KUiccApplCmdReqOffset + SIZE_UICC_SB_CLIENT + |
|
545 |
SIZE_UICC_SB_TRANSPARENT, |
|
546 |
sizeOfApplPathSubblock ); |
|
547 |
break; |
|
548 |
} |
|
549 |
case UICC_APPL_UPDATE_TRANSPARENT: |
|
550 |
{ |
|
551 |
numOfSubblocks = 4; |
|
552 |
// Create and append UICC_SB_CLIENT |
|
553 |
CreateUiccSbClient( isiMsg, KUiccApplCmdReqOffset ); |
|
554 |
// Create and append UICC_SB_TRANSPARENT |
|
555 |
CreateUiccSbTransparent( |
|
556 |
static_cast <const TUiccWriteTransparent&>( aParams ), |
|
557 |
isiMsg, |
|
558 |
KUiccApplCmdReqOffset + SIZE_UICC_SB_CLIENT ); |
|
559 |
// Create and append UICC_SB_APPL_PATH |
|
560 |
CreateUiccSbApplPath( |
|
561 |
static_cast <const TUiccWriteTransparent&>( aParams ), |
|
562 |
isiMsg, |
|
563 |
KUiccApplCmdReqOffset + SIZE_UICC_SB_CLIENT + |
|
564 |
SIZE_UICC_SB_TRANSPARENT, |
|
565 |
sizeOfApplPathSubblock ); |
|
566 |
// Create and append UICC_SB_FILE_DATA |
|
567 |
CreateUiccSbFileData( |
|
568 |
isiMsg, |
|
569 |
KUiccApplCmdReqOffset + SIZE_UICC_SB_CLIENT + |
|
570 |
SIZE_UICC_SB_TRANSPARENT + sizeOfApplPathSubblock, |
|
571 |
static_cast |
|
572 |
<const TUiccWriteTransparent&>( aParams ).fileData ); |
|
573 |
break; |
|
574 |
} |
|
575 |
case UICC_APPL_READ_LINEAR_FIXED: |
|
576 |
{ |
|
577 |
numOfSubblocks = 3; |
|
578 |
// Create and append UICC_SB_CLIENT |
|
579 |
CreateUiccSbClient( isiMsg, KUiccApplCmdReqOffset ); |
|
580 |
// Create and append UICC_SB_LINEAR_FIXED |
|
581 |
CreateUiccSbLinearFixed( |
|
582 |
static_cast <const TUiccReadLinearFixed&>( aParams ), |
|
583 |
isiMsg, |
|
584 |
KUiccApplCmdReqOffset + SIZE_UICC_SB_CLIENT ); |
|
585 |
// Create and append UICC_SB_APPL_PATH |
|
586 |
CreateUiccSbApplPath( |
|
587 |
static_cast <const TUiccReadLinearFixed&>( aParams ), |
|
588 |
isiMsg, |
|
589 |
KUiccApplCmdReqOffset + SIZE_UICC_SB_CLIENT + |
|
590 |
SIZE_UICC_SB_LINEAR_FIXED, |
|
591 |
sizeOfApplPathSubblock ); |
|
592 |
break; |
|
593 |
} |
|
594 |
case UICC_APPL_UPDATE_LINEAR_FIXED: |
|
595 |
{ |
|
596 |
// UICC_SB_LINEAR_FIXED, UICC_SB_APPL_PATH, UICC_SB_FILE_DATA |
|
597 |
numOfSubblocks = 4; |
|
598 |
// Create and append UICC_SB_CLIENT |
|
599 |
CreateUiccSbClient( isiMsg, KUiccApplCmdReqOffset ); |
|
600 |
// Create and append UICC_SB_LINEAR_FIXED |
|
601 |
CreateUiccSbLinearFixed( |
|
602 |
static_cast <const TUiccWriteLinearFixed&>( aParams ), |
|
603 |
isiMsg, |
|
604 |
KUiccApplCmdReqOffset + SIZE_UICC_SB_CLIENT ); |
|
605 |
// Create and append UICC_SB_APPL_PATH |
|
606 |
CreateUiccSbApplPath( |
|
607 |
static_cast <const TUiccWriteLinearFixed&>( aParams ), |
|
608 |
isiMsg, |
|
609 |
KUiccApplCmdReqOffset + SIZE_UICC_SB_CLIENT + |
|
610 |
SIZE_UICC_SB_LINEAR_FIXED, |
|
611 |
sizeOfApplPathSubblock ); |
|
612 |
// Create and append UICC_SB_FILE_DATA |
|
613 |
CreateUiccSbFileData( |
|
614 |
isiMsg, |
|
615 |
KUiccApplCmdReqOffset + SIZE_UICC_SB_CLIENT + |
|
616 |
SIZE_UICC_SB_TRANSPARENT + sizeOfApplPathSubblock, |
|
617 |
static_cast |
|
618 |
<const TUiccWriteLinearFixed&>( aParams ).fileData); |
|
619 |
break; |
|
620 |
} |
|
621 |
case UICC_APPL_FILE_INFO: |
|
622 |
{ |
|
623 |
numOfSubblocks = 1; |
|
624 |
// Create and append UICC_SB_APPL_PATH |
|
625 |
CreateUiccSbApplPath( |
|
626 |
aParams, |
|
627 |
isiMsg, |
|
628 |
KUiccApplCmdReqOffset, |
|
629 |
sizeOfApplPathSubblock ); |
|
630 |
break; |
|
631 |
} |
|
632 |
case UICC_APPL_APDU_SEND: |
|
633 |
{ |
|
634 |
numOfSubblocks = 3; |
|
635 |
// Create and append UICC_SB_CLIENT |
|
636 |
CreateUiccSbClient( isiMsg, KUiccApplCmdReqOffset, aApplType ); |
|
637 |
// Create and append UICC_SB_APPL_PATH |
|
638 |
CreateUiccSbApplPath( |
|
639 |
aParams, |
|
640 |
isiMsg, |
|
641 |
KUiccApplCmdReqOffset + SIZE_UICC_SB_CLIENT, |
|
642 |
sizeOfApplPathSubblock ); |
|
643 |
// Create and append UICC_SB_APDU |
|
644 |
const TUiccSendApdu* tmpPtr = static_cast<const TUiccSendApdu*>( &aParams ); |
|
645 |
CreateUiccSbApdu( |
|
646 |
isiMsg, |
|
647 |
KUiccApplCmdReqOffset + SIZE_UICC_SB_CLIENT + |
|
648 |
sizeOfApplPathSubblock, |
|
649 |
tmpPtr->apdu ); |
|
650 |
break; |
|
651 |
} |
|
652 |
default: |
|
653 |
{ |
|
654 |
ret = KErrArgument; |
|
655 |
TFLOGSTRING("TSY: CMmUiccMessHandler::CreateUiccApplCmdReq, unknown service type!" ); |
|
656 |
OstTrace0( TRACE_NORMAL, DUP2_CMMUICCMESSHANDLER_CREATEUICCAPPLCMDREQ, "CMmUiccMessHandler::CreateUiccApplCmdReq, unknown service type!" ); |
|
657 |
break; |
|
658 |
} |
|
659 |
} // End of switch ( serviceType ) |
|
660 |
||
661 |
if ( KErrNone == ret ) |
|
662 |
{ |
|
663 |
// Set number of subblocks |
|
664 |
isiMsg.Set8bit( |
|
665 |
ISI_HEADER_SIZE + UICC_APPL_CMD_REQ_OFFSET_NSB, |
|
666 |
numOfSubblocks ); |
|
667 |
return( iPhoNetSender->Send( isiMsg.Complete() ) ); |
|
668 |
} |
|
669 |
} // End of if ( NULL == iMessHandlerPrtList.At( trId ) ) |
|
670 |
else |
|
671 |
{ |
|
672 |
TFLOGSTRING("TSY: CMmUiccMessHandler::CreateUiccApplCmdReq, cannot handle the request, server busy!" ); |
|
673 |
OstTrace0( TRACE_NORMAL, DUP1_CMMUICCMESSHANDLER_CREATEUICCAPPLCMDREQ, "CMmUiccMessHandler::CreateUiccApplCmdReq, cannot handle the request, server busy!" ); |
|
674 |
ret = KErrServerBusy; |
|
675 |
} |
|
676 |
return ret; |
|
677 |
} |
|
678 |
||
679 |
// ----------------------------------------------------------------------------- |
|
680 |
// CMmUiccMessHandler::CreateUiccApplicationReq |
|
681 |
// (other items were commented in a header). |
|
682 |
// ----------------------------------------------------------------------------- |
|
683 |
// |
|
684 |
TInt CMmUiccMessHandler::CreateUiccApplicationReq( |
|
685 |
const TUiccParamsBase& aParams, |
|
686 |
TUint8 aServiceType, |
|
687 |
TUint8 aApplType ) |
|
688 |
{ |
|
689 |
TFLOGSTRING2("TSY: CMmUiccMessHandler::CreateUiccApplicationReq, service type: %d", aServiceType ); |
|
690 |
OstTraceExt1( TRACE_NORMAL, CMMUICCMESSHANDLER_CREATEUICCAPPLICATIONREQ, "CMmUiccMessHandler::CreateUiccApplicationReq;aServiceType=%hhu", aServiceType ); |
|
691 |
||
692 |
TInt ret (KErrGeneral); |
|
693 |
TUiccTrId trId( aParams.trId ); |
|
694 |
TUint8 numOfSubblocks( 0 ); |
|
695 |
||
696 |
// If there is the previous request ongoing (pointer was already set for |
|
697 |
// this operation) we can't handle this request. |
|
698 |
if ( NULL == iMessHandlerPrtList.At( trId ) ) |
|
699 |
{ |
|
700 |
// Save pointer to message handler, it is needed when receiving |
|
701 |
// response for this operation |
|
702 |
iMessHandlerPrtList[trId] = aParams.messHandlerPtr; |
|
703 |
||
704 |
// Create the ISI message |
|
705 |
TIsiSend isiMsg( iPhoNetSender->SendBufferDes() ); |
|
706 |
isiMsg.Set8bit( ISI_HEADER_OFFSET_RESOURCEID, PN_UICC ); |
|
707 |
isiMsg.Set8bit( |
|
708 |
ISI_HEADER_SIZE + UICC_APPLICATION_REQ_OFFSET_MESSAGEID, |
|
709 |
UICC_APPLICATION_REQ ); |
|
710 |
isiMsg.Set8bit( |
|
711 |
ISI_HEADER_SIZE + UICC_APPLICATION_REQ_OFFSET_SERVICETYPE, |
|
712 |
aServiceType ); |
|
713 |
||
714 |
switch ( aServiceType ) |
|
715 |
{ |
|
716 |
case UICC_APPL_LIST: |
|
717 |
{ |
|
718 |
// No subblocks in this case |
|
719 |
break; |
|
720 |
} |
|
721 |
case UICC_APPL_HOST_ACTIVATE: |
|
722 |
{ |
|
723 |
numOfSubblocks = 1; |
|
724 |
CreateUiccSbApplication( |
|
725 |
isiMsg, |
|
726 |
ISI_HEADER_SIZE + SIZE_UICC_APPLICATION_REQ, |
|
727 |
aApplType ); |
|
728 |
break; |
|
729 |
} |
|
730 |
default: |
|
731 |
{ |
|
732 |
break; |
|
733 |
} |
|
734 |
} |
|
735 |
||
736 |
// Set transaction ID and number of subblocks to ISI message |
|
737 |
isiMsg.Set8bit( |
|
738 |
ISI_HEADER_SIZE + UICC_APPLICATION_REQ_OFFSET_TRANSID, |
|
739 |
trId ); |
|
740 |
isiMsg.Set8bit( |
|
741 |
ISI_HEADER_SIZE + UICC_APPLICATION_REQ_OFFSET_NSB, |
|
742 |
numOfSubblocks ); |
|
743 |
ret = iPhoNetSender->Send( isiMsg.Complete() ); |
|
744 |
} |
|
745 |
else |
|
746 |
{ |
|
747 |
TFLOGSTRING("TSY: CMmUiccMessHandler::CreateUiccApplicationReq, cannot handle the request, server busy!" ); |
|
748 |
OstTrace0( TRACE_NORMAL, DUP1_CMMUICCMESSHANDLER_CREATEUICCAPPLICATIONREQ, "CMmUiccMessHandler::CreateUiccApplicationReq, cannot handle the request, server busy!" ); |
|
749 |
ret = KErrServerBusy; |
|
750 |
} |
|
751 |
return ret; |
|
752 |
} |
|
753 |
||
754 |
// ----------------------------------------------------------------------------- |
|
755 |
// CMmUiccMessHandler::GetApplicationId |
|
756 |
// (other items were commented in a header). |
|
757 |
// ----------------------------------------------------------------------------- |
|
758 |
// |
|
759 |
TUint8 CMmUiccMessHandler::GetApplicationId() const |
|
760 |
{ |
|
761 |
TFLOGSTRING2("TSY: CMmUiccMessHandler::GetApplicationId, application ID: %d", iApplicationId ); |
|
762 |
OstTraceExt1( TRACE_NORMAL, CMMUICCMESSHANDLER_GETAPPLICATIONID, "CMmUiccMessHandler::GetApplicationId;aApplId=%hhu", iApplicationId ); |
|
763 |
return iApplicationId; |
|
764 |
} |
|
765 |
||
766 |
// ----------------------------------------------------------------------------- |
|
767 |
// CMmUiccMessHandler::GetApplicationType |
|
768 |
// (other items were commented in a header). |
|
769 |
// ----------------------------------------------------------------------------- |
|
770 |
// |
|
771 |
TUint8 CMmUiccMessHandler::GetApplicationType() const |
|
772 |
{ |
|
773 |
TFLOGSTRING2("TSY: CMmUiccMessHandler::GetApplicationType, application type: %d", iApplicationType ); |
|
774 |
OstTraceExt1( TRACE_NORMAL, CMMUICCMESSHANDLER_GETAPPLICATIONTYPE, "CMmUiccMessHandler::GetApplicationType;aApplType=%hhu", iApplicationType ); |
|
775 |
return iApplicationType; |
|
776 |
} |
|
777 |
||
778 |
// ----------------------------------------------------------------------------- |
|
779 |
// CMmUiccMessHandler::GetApplicationFileId |
|
780 |
// (other items were commented in a header). |
|
781 |
// ----------------------------------------------------------------------------- |
|
782 |
// |
|
783 |
const TDesC8& CMmUiccMessHandler::GetApplicationFileId() const |
|
784 |
{ |
|
785 |
TFLOGSTRING("TSY: CMmUiccMessHandler::GetApplicationFileId" ); |
|
786 |
OstTrace0( TRACE_NORMAL, CMMUICCMESSHANDLER_GETAPPLICATIONFILEID, "CMmUiccMessHandler::GetApplicationFileId" ); |
|
787 |
return iApplFileId; |
|
788 |
} |
|
789 |
||
790 |
// ----------------------------------------------------------------------------- |
|
791 |
// CMmUiccMessHandler::GetCardType |
|
792 |
// (other items were commented in a header). |
|
793 |
// ----------------------------------------------------------------------------- |
|
794 |
// |
|
795 |
TUint8 CMmUiccMessHandler::GetCardType() const |
|
796 |
{ |
|
797 |
TFLOGSTRING("TSY: CMmUiccMessHandler::GetCardType" ); |
|
798 |
OstTrace0( TRACE_NORMAL, CMMUICCMESSHANDLER_GETCARDTYPE, "CMmUiccMessHandler::GetCardType" ); |
|
799 |
return iCardType; |
|
800 |
} |
|
801 |
||
802 |
// ----------------------------------------------------------------------------- |
|
803 |
// CMmUiccMessHandler::GetIsimApplicationStatus |
|
804 |
// (other items were commented in a header). |
|
805 |
// ----------------------------------------------------------------------------- |
|
806 |
// |
|
807 |
TUint8 CMmUiccMessHandler::GetIsimApplicationStatus() const |
|
808 |
{ |
|
809 |
TFLOGSTRING("TSY: CMmUiccMessHandler::GetIsimApplicationStatus" ); |
|
810 |
OstTrace0( TRACE_NORMAL, CMMUICCMESSHANDLER_GETISIMAPPLICATIONSTATUS, "CMmUiccMessHandler::GetIsimApplicationStatus" ); |
|
811 |
return iIsimApplicationStatus; |
|
812 |
} |
|
813 |
||
814 |
// ----------------------------------------------------------------------------- |
|
815 |
// CMmUiccMessHandler::IsIsimApplicationFound |
|
816 |
// (other items were commented in a header). |
|
817 |
// ----------------------------------------------------------------------------- |
|
818 |
// |
|
819 |
TBool CMmUiccMessHandler::IsIsimApplicationFound() const |
|
820 |
{ |
|
821 |
TFLOGSTRING("TSY: CMmUiccMessHandler::IsIsimApplicationFound" ); |
|
822 |
OstTrace0( TRACE_NORMAL, CMMUICCMESSHANDLER_ISISIMAPPLICATIONFOUND, "CMmUiccMessHandler::IsIsimApplicationFound" ); |
|
823 |
return iIsimApplicationFound; |
|
824 |
} |
|
825 |
||
826 |
// ----------------------------------------------------------------------------- |
|
827 |
// CMmUiccMessHandler::GetAid |
|
828 |
// (other items were commented in a header). |
|
829 |
// ----------------------------------------------------------------------------- |
|
830 |
// |
|
831 |
const RMobilePhone::TAID& CMmUiccMessHandler::GetAid() const |
|
832 |
{ |
|
833 |
TFLOGSTRING("TSY: CMmUiccMessHandler::GetAid" ); |
|
834 |
OstTrace0( TRACE_NORMAL, DUP1_CMMUICCMESSHANDLER_GETAPPLICATIONFILEID, "CMmUiccMessHandler::GetApplicationFileId" ); |
|
835 |
return iAid; |
|
836 |
} |
|
837 |
// ----------------------------------------------------------------------------- |
|
838 |
// CMmUiccMessHandler::CreateUiccSbApplPath |
|
839 |
// (other items were commented in a header). |
|
840 |
// ----------------------------------------------------------------------------- |
|
841 |
// |
|
842 |
void CMmUiccMessHandler::CreateUiccSbApplPath( |
|
843 |
const TUiccParamsBase& aParams, |
|
844 |
TIsiSend& aIsiMsg, |
|
845 |
TUint8 aMsgOffset, |
|
846 |
TUint8& aSizeOfSubblock ) |
|
847 |
{ |
|
848 |
TFLOGSTRING("TSY: CMmUiccMessHandler::CreateUiccSbApplPath" ); |
|
849 |
OstTrace0( TRACE_NORMAL, CMMUICCMESSHANDLER_CREATEUICCSBAPPLPATH, "CMmUiccMessHandler::CreateUiccSbApplPath" ); |
|
850 |
||
851 |
// UICC_SB_APPL_PATH subblock |
|
852 |
TBuf8<KUiccSbApplPathSize> uiccSbApplPathBuf( 0 ); |
|
853 |
TIsiSubBlock uiccSbApplPath( |
|
854 |
uiccSbApplPathBuf, |
|
855 |
UICC_SB_APPL_PATH, |
|
856 |
EIsiSubBlockTypeId16Len16 ); |
|
857 |
||
858 |
// File ID, 16-bit |
|
859 |
uiccSbApplPathBuf.Append( static_cast<TUint8>( aParams.fileId >> 8 ) ); |
|
860 |
uiccSbApplPathBuf.Append( static_cast<TUint8>( aParams.fileId ) ); |
|
861 |
// File ID SFI, 8-bit |
|
862 |
uiccSbApplPathBuf.Append( aParams.fileIdSfi ); |
|
863 |
// Filler, 8-bit |
|
864 |
uiccSbApplPathBuf.Append( KUiccPadding ); |
|
865 |
// Length of the DF path, 8-bit |
|
866 |
uiccSbApplPathBuf.Append( aParams.filePath.Length() ); |
|
867 |
// Filler, 8-bit |
|
868 |
uiccSbApplPathBuf.Append( KUiccPadding ); |
|
869 |
// Application file ID depends on card type, USIM or SIM |
|
870 |
uiccSbApplPathBuf.Append( aParams.filePath ); |
|
871 |
// Append subblock to ISI message |
|
872 |
aIsiMsg.CopyData( aMsgOffset, uiccSbApplPath.CompleteSubBlock() ); |
|
873 |
||
874 |
aSizeOfSubblock = uiccSbApplPathBuf.Length(); |
|
875 |
} |
|
876 |
||
877 |
// ----------------------------------------------------------------------------- |
|
878 |
// CMmUiccMessHandler::CreateUiccSbClient |
|
879 |
// (other items were commented in a header). |
|
880 |
// ----------------------------------------------------------------------------- |
|
881 |
// |
|
882 |
void CMmUiccMessHandler::CreateUiccSbClient( |
|
883 |
TIsiSend& aIsiMsg, |
|
884 |
TUint8 aMsgOffset, |
|
885 |
const TUint8 aApplType ) |
|
886 |
{ |
|
887 |
TFLOGSTRING("TSY: CMmUiccMessHandler::CreateUiccSbClient" ); |
|
888 |
OstTrace0( TRACE_NORMAL, CMMUICCMESSHANDLER_CREATEUICCSBCLIENT, "CMmUiccMessHandler::CreateUiccSbClient" ); |
|
889 |
||
890 |
// UICC_SB_CLIENT subblock |
|
891 |
TBuf8<SIZE_UICC_SB_CLIENT> uiccSbClientBuf( 0 ); |
|
892 |
TIsiSubBlock uiccSbClient( |
|
893 |
uiccSbClientBuf, |
|
894 |
UICC_SB_CLIENT, |
|
895 |
EIsiSubBlockTypeId16Len16 ); |
|
896 |
||
897 |
// 3x filler |
|
898 |
uiccSbClientBuf.Append( KUiccPadding ); |
|
899 |
uiccSbClientBuf.Append( KUiccPadding ); |
|
900 |
uiccSbClientBuf.Append( KUiccPadding ); |
|
901 |
||
902 |
if( UICC_APPL_TYPE_UICC_USIM == aApplType || |
|
903 |
UICC_APPL_TYPE_ICC_SIM == aApplType ) |
|
904 |
{ |
|
905 |
// Client ID |
|
906 |
uiccSbClientBuf.Append( iUiccClientId ); |
|
907 |
||
908 |
// Append subblock to ISI message |
|
909 |
aIsiMsg.CopyData( aMsgOffset, uiccSbClient.CompleteSubBlock() ); |
|
910 |
} |
|
911 |
else if( UICC_APPL_TYPE_UICC_ISIM == aApplType ) |
|
912 |
{ |
|
913 |
// Client ID |
|
914 |
uiccSbClientBuf.Append( iUiccIsimClientId ); |
|
915 |
||
916 |
// Append subblock to ISI message |
|
917 |
aIsiMsg.CopyData( aMsgOffset, uiccSbClient.CompleteSubBlock() ); |
|
918 |
} |
|
919 |
else |
|
920 |
{ |
|
921 |
TFLOGSTRING2("TSY: CMmUiccMessHandler::CreateUiccSbClient: unknown appl type: 0x%x", aApplType ); |
|
922 |
OstTrace1( TRACE_NORMAL, DUP1_CMMUICCMESSHANDLER_CREATEUICCSBCLIENT, "CMmUiccMessHandler::CreateUiccSbClient: unknown appl type: 0x%x", aApplType ); |
|
923 |
} |
|
924 |
} |
|
925 |
||
926 |
// ----------------------------------------------------------------------------- |
|
927 |
// CMmUiccMessHandler::CreateUiccSbTransparent |
|
928 |
// (other items were commented in a header). |
|
929 |
// ----------------------------------------------------------------------------- |
|
930 |
// |
|
931 |
void CMmUiccMessHandler::CreateUiccSbTransparent( |
|
932 |
const TUiccReadTransparent& aParams, |
|
933 |
TIsiSend& aIsiMsg, |
|
934 |
TUint8 aMsgOffset ) |
|
935 |
{ |
|
936 |
TFLOGSTRING("TSY: CMmUiccMessHandler::CreateUiccSbTransparent" ); |
|
937 |
OstTrace0( TRACE_NORMAL, CMMUICCMESSHANDLER_CREATEUICCSBTRANSPARENT, "CMmUiccMessHandler::CreateUiccSbTransparent" ); |
|
938 |
||
939 |
// UICC_SB_TRANSPARENT subblock |
|
940 |
TBuf8<SIZE_UICC_SB_TRANSPARENT> uiccSbTransparentBuf( 0 ); |
|
941 |
TIsiSubBlock uiccSbTransparent( |
|
942 |
uiccSbTransparentBuf, |
|
943 |
UICC_SB_TRANSPARENT, |
|
944 |
EIsiSubBlockTypeId16Len16 ); |
|
945 |
||
946 |
// File offset, 16-bit |
|
947 |
uiccSbTransparentBuf.Append( |
|
948 |
static_cast<TInt8>( aParams.dataOffset >> 8 ) ); |
|
949 |
uiccSbTransparentBuf.Append( static_cast<TInt8>( aParams.dataOffset ) ); |
|
950 |
// Data amount, 16-bit, only used in read case |
|
951 |
uiccSbTransparentBuf.Append( |
|
952 |
static_cast<TInt8>( aParams.dataAmount >> 8 ) ); |
|
953 |
uiccSbTransparentBuf.Append( static_cast<TInt8>( aParams.dataAmount ) ); |
|
954 |
||
955 |
// Append subblock to ISI message |
|
956 |
aIsiMsg.CopyData( aMsgOffset, uiccSbTransparent.CompleteSubBlock() ); |
|
957 |
} |
|
958 |
||
959 |
// ----------------------------------------------------------------------------- |
|
960 |
// CMmUiccMessHandler::CreateUiccSbLinearFixed |
|
961 |
// (other items were commented in a header). |
|
962 |
// ----------------------------------------------------------------------------- |
|
963 |
// |
|
964 |
void CMmUiccMessHandler::CreateUiccSbLinearFixed( |
|
965 |
const TUiccReadLinearFixed& aParams, |
|
966 |
TIsiSend& aIsiMsg, |
|
967 |
TUint8 aMsgOffset ) |
|
968 |
{ |
|
969 |
TFLOGSTRING("TSY: CMmUiccMessHandler::CreateUiccSbLinearFixed" ); |
|
970 |
OstTrace0( TRACE_NORMAL, CMMUICCMESSHANDLER_CREATEUICCSBLINEARFIXED, "CMmUiccMessHandler::CreateUiccSbLinearFixed" ); |
|
971 |
||
972 |
// UICC_SB_LINEAR_FIXED subblock |
|
973 |
TBuf8<SIZE_UICC_SB_LINEAR_FIXED> uiccSbLinearFixedBuf( 0 ); |
|
974 |
TIsiSubBlock uiccSbLinearFixed( |
|
975 |
uiccSbLinearFixedBuf, |
|
976 |
UICC_SB_LINEAR_FIXED, |
|
977 |
EIsiSubBlockTypeId16Len16 ); |
|
978 |
||
979 |
// File record, 8-bit |
|
980 |
uiccSbLinearFixedBuf.Append( aParams.record ); |
|
981 |
// Record offset in bytes, 8-bit |
|
982 |
uiccSbLinearFixedBuf.Append( static_cast<TInt8>( aParams.dataOffset ) ); |
|
983 |
// Data amount, 8-bit |
|
984 |
uiccSbLinearFixedBuf.Append( static_cast<TInt8>( aParams.dataAmount ) ); |
|
985 |
||
986 |
// Append subblock to ISI message |
|
987 |
aIsiMsg.CopyData( aMsgOffset, uiccSbLinearFixed.CompleteSubBlock() ); |
|
988 |
} |
|
989 |
||
990 |
// ----------------------------------------------------------------------------- |
|
991 |
// CMmUiccMessHandler::CreateUiccSbFileData |
|
992 |
// (other items were commented in a header). |
|
993 |
// ----------------------------------------------------------------------------- |
|
994 |
// |
|
995 |
void CMmUiccMessHandler::CreateUiccSbFileData( |
|
996 |
TIsiSend& aIsiMsg, |
|
997 |
TUint8 aMsgOffset, |
|
998 |
const TDesC8& aUpdateData |
|
999 |
) |
|
1000 |
{ |
|
1001 |
TFLOGSTRING("TSY: CMmUiccMessHandler::CreateUiccSbFileData" ); |
|
1002 |
OstTrace0( TRACE_NORMAL, CMMUICCMESSHANDLER_CREATEUICCSBFILEDATA, "CMmUiccMessHandler::CreateUiccSbFileData" ); |
|
1003 |
||
1004 |
// UICC_SB_FILE_DATA subblock |
|
1005 |
TBuf8<KUiccSbFileDataSize> uiccSbFileDataBuf( 0 ); |
|
1006 |
TIsiSubBlock uiccSbFileData( |
|
1007 |
uiccSbFileDataBuf, |
|
1008 |
UICC_SB_FILE_DATA, |
|
1009 |
EIsiSubBlockTypeId16Len16 ); |
|
1010 |
||
1011 |
// Length of file data, 32-bit |
|
1012 |
TInt length( aUpdateData.Length() ); |
|
1013 |
uiccSbFileDataBuf.Append( static_cast<TInt8>( length >> 24 ) ); |
|
1014 |
uiccSbFileDataBuf.Append( static_cast<TInt8>( length >> 16 ) ); |
|
1015 |
uiccSbFileDataBuf.Append( static_cast<TInt8>( length >> 8 ) ); |
|
1016 |
uiccSbFileDataBuf.Append( static_cast<TInt8>( length ) ); |
|
1017 |
||
1018 |
// Data |
|
1019 |
uiccSbFileDataBuf.Append( aUpdateData ); |
|
1020 |
||
1021 |
// Append subblock to ISI message |
|
1022 |
aIsiMsg.CopyData( aMsgOffset, uiccSbFileData.CompleteSubBlock() ); |
|
1023 |
} |
|
1024 |
||
1025 |
// ----------------------------------------------------------------------------- |
|
1026 |
// CMmUiccMessHandler::CreateUiccSbApplication |
|
1027 |
// (other items were commented in a header). |
|
1028 |
// ----------------------------------------------------------------------------- |
|
1029 |
// |
|
1030 |
void CMmUiccMessHandler::CreateUiccSbApplication( |
|
1031 |
TIsiSend& aIsiMsg, |
|
1032 |
TUint8 aMsgOffset, |
|
1033 |
TUint8 aApplType ) |
|
1034 |
{ |
|
1035 |
TFLOGSTRING("TSY: CMmUiccMessHandler::CreateUiccSbApplication" ); |
|
1036 |
OstTrace0( TRACE_NORMAL, CMMUICCMESSHANDLER_CREATEUICCSBAPPLICATION, "CMmUiccMessHandler::CreateUiccSbApplication" ); |
|
1037 |
||
1038 |
// SIZE_UICC_SB_APPLICATION_STR |
|
1039 |
TBuf8<SIZE_UICC_SB_APPLICATION> uiccSbApplicationBuf( 0 ); |
|
1040 |
TIsiSubBlock uiccSbApplication( |
|
1041 |
uiccSbApplicationBuf, |
|
1042 |
UICC_SB_APPLICATION, |
|
1043 |
EIsiSubBlockTypeId16Len16 ); |
|
1044 |
||
1045 |
// 2x filler |
|
1046 |
uiccSbApplicationBuf.Append( KUiccPadding ); |
|
1047 |
uiccSbApplicationBuf.Append( KUiccPadding ); |
|
1048 |
||
1049 |
if( UICC_APPL_TYPE_UICC_USIM == aApplType || |
|
1050 |
UICC_APPL_TYPE_ICC_SIM == aApplType ) |
|
1051 |
{ |
|
1052 |
// Application type (8-bit) |
|
1053 |
uiccSbApplicationBuf.Append( iApplicationType ); |
|
1054 |
||
1055 |
// Application ID (8-bit) |
|
1056 |
uiccSbApplicationBuf.Append( iApplicationId ); |
|
1057 |
||
1058 |
// Append subblock to ISI message |
|
1059 |
aIsiMsg.CopyData( aMsgOffset, uiccSbApplication.CompleteSubBlock() ); |
|
1060 |
} |
|
1061 |
else if( UICC_APPL_TYPE_UICC_ISIM == aApplType ) |
|
1062 |
{ |
|
1063 |
// Application type (8-bit) |
|
1064 |
uiccSbApplicationBuf.Append( aApplType ); |
|
1065 |
||
1066 |
// Application ID (8-bit) |
|
1067 |
uiccSbApplicationBuf.Append( iIsimApplicationId ); |
|
1068 |
||
1069 |
// Append subblock to ISI message |
|
1070 |
aIsiMsg.CopyData( aMsgOffset, uiccSbApplication.CompleteSubBlock() ); |
|
1071 |
} |
|
1072 |
else |
|
1073 |
{ |
|
1074 |
TFLOGSTRING2("TSY: CMmUiccMessHandler::CreateUiccSbApplication: unknown application type: 0x%x", aApplType ); |
|
1075 |
OstTrace1( TRACE_NORMAL, DUP1_CMMUICCMESSHANDLER_CREATEUICCSBAPPLICATION, "CMmUiccMessHandler::CreateUiccSbApplication: unknown application type: 0x%x", aApplType ); |
|
1076 |
} |
|
1077 |
} |
|
1078 |
||
1079 |
// ----------------------------------------------------------------------------- |
|
1080 |
// CMmUiccMessHandler::GetFileData |
|
1081 |
// (other items were commented in a header). |
|
1082 |
// ----------------------------------------------------------------------------- |
|
1083 |
// |
|
1084 |
const TPtrC8 CMmUiccMessHandler::GetFileData( const TIsiReceiveC& aIsiMsg ) |
|
1085 |
{ |
|
1086 |
TFLOGSTRING("TSY: CMmUiccMessHandler::GetFileData" ); |
|
1087 |
OstTrace0( TRACE_NORMAL, CMMUICCMESSHANDLER_GETFILEDATA, "CMmUiccMessHandler::GetFileData" ); |
|
1088 |
||
1089 |
TPtrC8 data( KNullDesC8 ); |
|
1090 |
||
1091 |
// File data from UICC_SB_FILE_DATA |
|
1092 |
TUint uiccSbFileDataOffset( 0 ); |
|
1093 |
if ( KErrNone == aIsiMsg.FindSubBlockOffsetById( |
|
1094 |
ISI_HEADER_SIZE + SIZE_UICC_APPL_CMD_RESP, |
|
1095 |
UICC_SB_FILE_DATA, |
|
1096 |
EIsiSubBlockTypeId16Len16, |
|
1097 |
uiccSbFileDataOffset ) ) |
|
1098 |
{ |
|
1099 |
TInt fileDataLength( aIsiMsg.Get32bit( |
|
1100 |
uiccSbFileDataOffset + UICC_SB_FILE_DATA_OFFSET_DATALENGTH ) ); |
|
1101 |
data.Set( aIsiMsg.GetData( |
|
1102 |
uiccSbFileDataOffset + UICC_SB_FILE_DATA_OFFSET_DATA, |
|
1103 |
fileDataLength ) ); |
|
1104 |
} |
|
1105 |
return data; |
|
1106 |
} |
|
1107 |
||
1108 |
// ----------------------------------------------------------------------------- |
|
1109 |
// CMmUiccMessHandler::HandleUiccResp |
|
1110 |
// (other items were commented in a header). |
|
1111 |
// ----------------------------------------------------------------------------- |
|
1112 |
// |
|
1113 |
TUint8 CMmUiccMessHandler::HandleUiccResp( const TIsiReceiveC& aIsiMsg ) |
|
1114 |
{ |
|
1115 |
TFLOGSTRING("TSY: CMmUiccMessHandler::HandleUiccResp" ); |
|
1116 |
OstTrace0( TRACE_NORMAL, CMMUICCMESSHANDLER_HANDLEUICCRESP, "CMmUiccMessHandler::HandleUiccResp" ); |
|
1117 |
||
1118 |
TUint8 serverStatus( UICC_STATUS_NOT_READY ); |
|
1119 |
// Check the service type |
|
1120 |
TUint8 serviceType( aIsiMsg.Get8bit( |
|
1121 |
ISI_HEADER_SIZE + UICC_RESP_OFFSET_SERVICETYPE ) ); |
|
1122 |
if ( UICC_STATUS_GET == serviceType ) |
|
1123 |
{ |
|
1124 |
// Get the status |
|
1125 |
TUint8 status( |
|
1126 |
aIsiMsg.Get8bit( ISI_HEADER_SIZE + UICC_RESP_OFFSET_STATUS ) ); |
|
1127 |
if ( UICC_STATUS_OK == status ) |
|
1128 |
{ |
|
1129 |
// Get the UICC server status |
|
1130 |
serverStatus = aIsiMsg.Get8bit( |
|
1131 |
ISI_HEADER_SIZE + UICC_RESP_OFFSET_SERVERSTATUS ); |
|
1132 |
} |
|
1133 |
} |
|
1134 |
return serverStatus; |
|
1135 |
} |
|
1136 |
||
1137 |
// ----------------------------------------------------------------------------- |
|
1138 |
// CMmUiccMessHandler::HandleUiccApplicationResp |
|
1139 |
// (other items were commented in a header). |
|
1140 |
// ----------------------------------------------------------------------------- |
|
1141 |
// |
|
1142 |
TInt CMmUiccMessHandler::HandleUiccApplicationResp( |
|
1143 |
const TIsiReceiveC& aIsiMsg ) |
|
1144 |
{ |
|
1145 |
TFLOGSTRING("TSY: CMmUiccMessHandler::HandleUiccApplicationResp" ); |
|
1146 |
OstTrace0( TRACE_NORMAL, CMMUICCMESSHANDLER_HANDLEUICCAPPLICATIONRESP, "CMmUiccMessHandler::HandleUiccApplicationResp" ); |
|
1147 |
||
1148 |
TInt ret( KErrNone ); |
|
1149 |
// Get service type and status |
|
1150 |
TUint8 serviceType( aIsiMsg.Get8bit( |
|
1151 |
ISI_HEADER_SIZE + UICC_APPLICATION_RESP_OFFSET_SERVICETYPE ) ); |
|
1152 |
TUint8 status( aIsiMsg.Get8bit( |
|
1153 |
ISI_HEADER_SIZE + UICC_APPLICATION_RESP_OFFSET_STATUS ) ); |
|
1154 |
iCardType = aIsiMsg.Get8bit( |
|
1155 |
ISI_HEADER_SIZE + UICC_APPLICATION_RESP_OFFSET_CARDTYPE ); |
|
1156 |
TUint8 trId( aIsiMsg.Get8bit( |
|
1157 |
ISI_HEADER_SIZE + UICC_APPLICATION_RESP_OFFSET_TRANSID ) ); |
|
1158 |
TUint16 startIndex( ISI_HEADER_SIZE + SIZE_UICC_APPLICATION_RESP ); |
|
1159 |
||
1160 |
if ( UICC_STATUS_OK == status ) |
|
1161 |
{ |
|
1162 |
switch( serviceType ) |
|
1163 |
{ |
|
1164 |
case UICC_APPL_LIST: |
|
1165 |
{ |
|
1166 |
// Check if UICC_SB_APPL_DATA_OBJECT is included => UICC application |
|
1167 |
TUint uiccSbApplDataObjectOffset( 0 ); |
|
1168 |
TUint8 applicationType( 0 ); |
|
1169 |
TUint16 sbLen( 0 ); |
|
1170 |
||
1171 |
TBool usimApplFound( EFalse ); |
|
1172 |
||
1173 |
while ( KErrNone == aIsiMsg.FindSubBlockOffsetById( |
|
1174 |
startIndex, |
|
1175 |
UICC_SB_APPL_DATA_OBJECT, |
|
1176 |
EIsiSubBlockTypeId16Len16, |
|
1177 |
uiccSbApplDataObjectOffset ) ) |
|
1178 |
{ |
|
1179 |
applicationType = aIsiMsg.Get8bit( |
|
1180 |
uiccSbApplDataObjectOffset + |
|
1181 |
UICC_SB_APPL_DATA_OBJECT_OFFSET_APPLICATIONTYPE ); |
|
1182 |
||
1183 |
sbLen = aIsiMsg.Get16bit( |
|
1184 |
uiccSbApplDataObjectOffset + |
|
1185 |
UICC_SB_APPL_DATA_OBJECT_OFFSET_SBLEN ); |
|
1186 |
||
1187 |
if ( UICC_APPL_TYPE_UICC_USIM == applicationType && |
|
1188 |
EFalse == usimApplFound ) |
|
1189 |
{ |
|
1190 |
iApplicationType = applicationType; |
|
1191 |
||
1192 |
iApplicationId = aIsiMsg.Get8bit( |
|
1193 |
uiccSbApplDataObjectOffset + |
|
1194 |
UICC_SB_APPL_DATA_OBJECT_OFFSET_APPLID ); |
|
1195 |
iApplicationStatus = aIsiMsg.Get8bit( |
|
1196 |
uiccSbApplDataObjectOffset + |
|
1197 |
UICC_SB_APPL_DATA_OBJECT_OFFSET_APPLSTATUS ); |
|
1198 |
||
1199 |
TUint8 length( aIsiMsg.Get8bit( |
|
1200 |
uiccSbApplDataObjectOffset + |
|
1201 |
UICC_SB_APPL_DATA_OBJECT_OFFSET_APPLDOLEN ) ); |
|
1202 |
||
1203 |
// Application data object contains EF dir data, |
|
1204 |
// 5 bytes are mandatory. See TS 102.221 V7.11.0 table 13.2 |
|
1205 |
if ( 5 <= length ) |
|
1206 |
{ |
|
1207 |
TPtrC8 applDataObject( aIsiMsg.GetData( |
|
1208 |
uiccSbApplDataObjectOffset + |
|
1209 |
UICC_SB_APPL_DATA_OBJECT_OFFSET_APPLDO, |
|
1210 |
length ) ); |
|
1211 |
// Length of AID is located in index 3 |
|
1212 |
TUint8 aidLength( applDataObject[3] ); |
|
1213 |
// Copy actual AID |
|
1214 |
iAid.Copy( applDataObject.Mid( 4, aidLength ) ); |
|
1215 |
} |
|
1216 |
||
1217 |
usimApplFound = ETrue; |
|
1218 |
} |
|
1219 |
else if( UICC_APPL_TYPE_UICC_ISIM == applicationType && |
|
1220 |
EFalse == iIsimApplicationFound ) |
|
1221 |
{ |
|
1222 |
iIsimApplicationFound = ETrue; |
|
1223 |
||
1224 |
iIsimApplicationId = aIsiMsg.Get8bit( |
|
1225 |
uiccSbApplDataObjectOffset + |
|
1226 |
UICC_SB_APPL_DATA_OBJECT_OFFSET_APPLID ); |
|
1227 |
iIsimApplicationStatus = aIsiMsg.Get8bit( |
|
1228 |
uiccSbApplDataObjectOffset + |
|
1229 |
UICC_SB_APPL_DATA_OBJECT_OFFSET_APPLSTATUS ); |
|
1230 |
} |
|
1231 |
startIndex = uiccSbApplDataObjectOffset + sbLen; |
|
1232 |
} |
|
1233 |
if ( EFalse == usimApplFound ) // ICC application |
|
1234 |
{ |
|
1235 |
iApplicationType = UICC_APPL_TYPE_ICC_SIM; |
|
1236 |
iApplicationId = UICC_APPL_ID_UNKNOWN; |
|
1237 |
// Application file ID for GSM |
|
1238 |
TBuf8<2> gsmFileId; |
|
1239 |
gsmFileId.Append( 0x7F ); |
|
1240 |
gsmFileId.Append( 0x20 ); |
|
1241 |
iApplFileId.Copy( gsmFileId ); |
|
1242 |
} |
|
1243 |
// Activate the application |
|
1244 |
if ( UICC_STATUS_APPL_ACTIVE != iApplicationStatus ) |
|
1245 |
{ |
|
1246 |
TUiccParamsBase params; |
|
1247 |
params.messHandlerPtr = static_cast<MUiccOperationBase*>( this ); |
|
1248 |
params.trId = ETrIdActivateUiccApplication; |
|
1249 |
ret = CreateUiccApplicationReq( params, UICC_APPL_HOST_ACTIVATE ); |
|
1250 |
} |
|
1251 |
break; |
|
1252 |
} |
|
1253 |
case UICC_APPL_HOST_ACTIVATE: |
|
1254 |
{ |
|
1255 |
TUint uiccSbClientOffset( 0 ); |
|
1256 |
if ( KErrNone == aIsiMsg.FindSubBlockOffsetById( |
|
1257 |
startIndex, |
|
1258 |
UICC_SB_CLIENT, |
|
1259 |
EIsiSubBlockTypeId16Len16, |
|
1260 |
uiccSbClientOffset ) ) |
|
1261 |
{ |
|
1262 |
if( ETrIdActivateUiccApplication == trId ) |
|
1263 |
{ |
|
1264 |
iUiccClientId = aIsiMsg.Get8bit( |
|
1265 |
uiccSbClientOffset + |
|
1266 |
UICC_SB_CLIENT_OFFSET_CLIENTID ); |
|
1267 |
} |
|
1268 |
else if( ETrIdActivateIsimApplication == trId ) |
|
1269 |
{ |
|
1270 |
iUiccIsimClientId = aIsiMsg.Get8bit( |
|
1271 |
uiccSbClientOffset + |
|
1272 |
UICC_SB_CLIENT_OFFSET_CLIENTID ); |
|
1273 |
} |
|
1274 |
} |
|
1275 |
// UICC_SB_FCI contains PIN key references |
|
1276 |
TUint uiccSbFciOffset( 0 ); |
|
1277 |
if ( KErrNone == aIsiMsg.FindSubBlockOffsetById( |
|
1278 |
ISI_HEADER_SIZE + SIZE_UICC_APPLICATION_RESP, |
|
1279 |
UICC_SB_FCI, |
|
1280 |
EIsiSubBlockTypeId16Len16, |
|
1281 |
uiccSbFciOffset ) ) |
|
1282 |
{ |
|
5
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
1283 |
// Check is the SIM UICC |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
1284 |
TPtrC8 data( KNullDesC8 ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
1285 |
|
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
1286 |
// The whole sub block is returned |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
1287 |
TInt sbLength( aIsiMsg.Get16bit( |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
1288 |
uiccSbFciOffset + UICC_SB_FCI_OFFSET_SBLEN ) ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
1289 |
data.Set( aIsiMsg.GetData( |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
1290 |
uiccSbFciOffset, |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
1291 |
sbLength ) ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
1292 |
|
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
1293 |
TFci fci( data ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
1294 |
if( UICC_CARD_TYPE_UICC == fci.GetTypeOfCard() ) |
0 | 1295 |
{ |
5
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
1296 |
StorePinKeyReferences( data ); |
0 | 1297 |
} |
1298 |
} |
|
5
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
1299 |
|
0 | 1300 |
// In case of ICC there is two UICC_SB_CHV subblocks |
1301 |
// that contain PIN IDs for ICC application |
|
1302 |
TUint uiccSbChvOffset( 0 ); |
|
1303 |
while ( KErrNone == aIsiMsg.FindSubBlockOffsetById( |
|
1304 |
startIndex, |
|
1305 |
UICC_SB_CHV, |
|
1306 |
EIsiSubBlockTypeId16Len16, |
|
1307 |
uiccSbChvOffset ) ) |
|
1308 |
{ |
|
1309 |
TUint8 chvQualifier( aIsiMsg.Get8bit( |
|
1310 |
uiccSbChvOffset + |
|
1311 |
UICC_SB_CHV_OFFSET_CHVQUALIFIER ) ); |
|
1312 |
if ( UICC_CHV1 == chvQualifier ) // PIN1 |
|
1313 |
{ |
|
1314 |
iPin1Id = aIsiMsg.Get8bit( |
|
1315 |
uiccSbChvOffset + UICC_SB_CHV_OFFSET_PINID ); |
|
1316 |
} |
|
1317 |
else // PIN2 |
|
1318 |
{ |
|
1319 |
iPin2Id = aIsiMsg.Get8bit( |
|
1320 |
uiccSbChvOffset + UICC_SB_CHV_OFFSET_PINID ); |
|
1321 |
} |
|
1322 |
startIndex = uiccSbChvOffset + SIZE_UICC_SB_CHV; |
|
1323 |
} |
|
1324 |
break; |
|
1325 |
} |
|
1326 |
default: |
|
1327 |
{ |
|
1328 |
break; |
|
1329 |
} |
|
1330 |
} |
|
1331 |
} |
|
1332 |
else // if ( UICC_STATUS_OK == status ) |
|
1333 |
{ |
|
1334 |
ret = KErrGeneral; |
|
1335 |
TUint8 details( aIsiMsg.Get8bit( |
|
1336 |
ISI_HEADER_SIZE + UICC_APPLICATION_RESP_OFFSET_DETAILS ) ); |
|
1337 |
} |
|
1338 |
return ret; |
|
1339 |
} |
|
1340 |
||
1341 |
// ----------------------------------------------------------------------------- |
|
1342 |
// CMmUiccMessHandler::GetFileFCI |
|
1343 |
// (other items were commented in a header). |
|
1344 |
// ----------------------------------------------------------------------------- |
|
1345 |
// |
|
1346 |
const TPtrC8 CMmUiccMessHandler::GetFileFCI( const TIsiReceiveC& aIsiMsg ) |
|
1347 |
{ |
|
1348 |
TFLOGSTRING("TSY: CMmUiccMessHandler::GetFileFCI"); |
|
1349 |
OstTrace0( TRACE_NORMAL, CMMUICCMESSHANDLER_GETFILEFCI, "CMmUiccMessHandler::GetFileFCI" ); |
|
1350 |
||
1351 |
TPtrC8 data( KNullDesC8 ); |
|
1352 |
TUint uiccSbFileDataOffset( 0 ); |
|
1353 |
||
1354 |
if ( KErrNone == aIsiMsg.FindSubBlockOffsetById( |
|
1355 |
ISI_HEADER_SIZE + SIZE_UICC_APPL_CMD_RESP, |
|
1356 |
UICC_SB_FCI, |
|
1357 |
EIsiSubBlockTypeId16Len16, |
|
1358 |
uiccSbFileDataOffset ) ) |
|
1359 |
{ |
|
5
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
1360 |
// The whole sub block is returned |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
1361 |
TInt sbLength( aIsiMsg.Get16bit( |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
1362 |
uiccSbFileDataOffset + UICC_SB_FCI_OFFSET_SBLEN ) ); |
0 | 1363 |
data.Set( aIsiMsg.GetData( |
5
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
1364 |
uiccSbFileDataOffset, |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
1365 |
sbLength ) ); |
0 | 1366 |
} |
1367 |
return data; |
|
1368 |
} |
|
1369 |
||
1370 |
// ----------------------------------------------------------------------------- |
|
1371 |
// CMmUiccMessHandler::CreateUiccConnectorReq |
|
1372 |
// (other items were commented in a header). |
|
1373 |
// ----------------------------------------------------------------------------- |
|
1374 |
// |
|
1375 |
TInt CMmUiccMessHandler::CreateUiccConnectorReq( |
|
1376 |
const TUiccParamsBase& aParams ) |
|
1377 |
{ |
|
1378 |
TFLOGSTRING("TSY: CMmUiccMessHandler::CreateUiccConnectorReq"); |
|
1379 |
OstTrace0( TRACE_NORMAL, CMMUICCMESSHANDLER_CREATEUICCCONNREQ, "CMmUiccMessHandler::CreateUiccConnectorReq" ); |
|
1380 |
||
1381 |
TInt ret (KErrGeneral); |
|
1382 |
TInt trId( aParams.trId ); |
|
1383 |
TInt8 serviceType( aParams.serviceType ); |
|
1384 |
TUint8 numOfSubblocks( 0 ); |
|
1385 |
||
1386 |
// If there is the previous request ongoing (pointer was already set for |
|
1387 |
// this operation) we can't handle this request. |
|
1388 |
if ( NULL == iMessHandlerPrtList.At( trId ) ) |
|
1389 |
{ |
|
1390 |
// Save pointer to message handler, it is needed when receiving |
|
1391 |
// response for this operation |
|
1392 |
iMessHandlerPrtList[trId] = aParams.messHandlerPtr; |
|
1393 |
||
1394 |
// Create UICC_CONNECTOR_REQ message |
|
1395 |
TIsiSend isiMsg( iPhoNetSender->SendBufferDes() ); |
|
1396 |
isiMsg.Set8bit( ISI_HEADER_OFFSET_RESOURCEID, PN_UICC ); |
|
1397 |
isiMsg.Set8bit( |
|
1398 |
ISI_HEADER_SIZE + UICC_CONNECTOR_REQ_OFFSET_TRANSID, trId ); |
|
1399 |
isiMsg.Set8bit( |
|
1400 |
ISI_HEADER_SIZE + UICC_CONNECTOR_REQ_OFFSET_MESSAGEID, |
|
1401 |
UICC_CONNECTOR_REQ ); |
|
1402 |
isiMsg.Set8bit( |
|
1403 |
ISI_HEADER_SIZE + UICC_CONNECTOR_REQ_OFFSET_SERVICETYPE, |
|
1404 |
serviceType ); |
|
1405 |
||
1406 |
switch( serviceType ) |
|
1407 |
{ |
|
1408 |
case UICC_CONNECT: |
|
1409 |
{ |
|
1410 |
// Set status to not active, since UICC connect request |
|
1411 |
// resets smartcard. |
|
1412 |
iApplicationStatus = UICC_STATUS_APPL_NOT_ACTIVE; |
|
1413 |
||
1414 |
// Sets flag, that when the response for this request is |
|
1415 |
// received traid is not removed from the list, until |
|
1416 |
// UICC_APPLICATION_IND is received. |
|
1417 |
iDoNotRemoveTransactionID = ETrue; |
|
1418 |
break; |
|
1419 |
} |
|
1420 |
default: |
|
1421 |
break; |
|
1422 |
} |
|
1423 |
||
1424 |
isiMsg.Set8bit( |
|
1425 |
ISI_HEADER_SIZE + UICC_CONNECTOR_REQ_OFFSET_NSB, |
|
1426 |
numOfSubblocks ); |
|
1427 |
||
1428 |
return( iPhoNetSender->Send( isiMsg.Complete() ) ); |
|
1429 |
} |
|
1430 |
else |
|
1431 |
{ |
|
1432 |
ret = KErrServerBusy; |
|
1433 |
} |
|
1434 |
return ret; |
|
1435 |
} |
|
1436 |
||
1437 |
// ----------------------------------------------------------------------------- |
|
1438 |
// CMmUiccMessHandler::CreateUiccApduReq |
|
1439 |
// (other items were commented in a header). |
|
1440 |
// ----------------------------------------------------------------------------- |
|
1441 |
// |
|
1442 |
TInt CMmUiccMessHandler::CreateUiccApduReq( const TUiccParamsApduReq& aParams ) |
|
1443 |
{ |
|
1444 |
TFLOGSTRING("TSY: CMmUiccMessHandler::CreateUiccApduReq"); |
|
1445 |
OstTrace0( TRACE_NORMAL, CMMUICCMESSHANDLER_CREATEUICCAPDUREQ, "CMmUiccMessHandler::CreateUiccApduReq" ); |
|
1446 |
||
1447 |
TInt ret (KErrGeneral); |
|
1448 |
TInt trId( aParams.trId ); |
|
1449 |
TInt8 serviceType( aParams.serviceType ); |
|
1450 |
TUint8 numOfSubblocks( 0 ); |
|
1451 |
TUint8 action( aParams.action ); |
|
1452 |
||
1453 |
// If there is the previous request ongoing (pointer was already set for |
|
1454 |
// this operation) we can't handle this request. |
|
1455 |
if ( NULL == iMessHandlerPrtList.At( trId ) ) |
|
1456 |
{ |
|
1457 |
// Save pointer to message handler, it is needed when receiving |
|
1458 |
// response for this operation |
|
1459 |
iMessHandlerPrtList[trId] = aParams.messHandlerPtr; |
|
1460 |
// Create UICC_APDU_REQ |
|
1461 |
TIsiSend isiMsg( iPhoNetSender->SendBufferDes() ); |
|
1462 |
isiMsg.Set8bit( ISI_HEADER_OFFSET_RESOURCEID, PN_UICC ); |
|
1463 |
isiMsg.Set8bit( ISI_HEADER_SIZE + UICC_APDU_REQ_OFFSET_TRANSID, trId ); |
|
1464 |
isiMsg.Set8bit( |
|
1465 |
ISI_HEADER_SIZE + UICC_APDU_REQ_OFFSET_MESSAGEID, |
|
1466 |
UICC_APDU_REQ ); |
|
1467 |
isiMsg.Set8bit( |
|
1468 |
ISI_HEADER_SIZE + UICC_APDU_REQ_OFFSET_SERVICETYPE, |
|
1469 |
serviceType ); |
|
1470 |
||
1471 |
switch( serviceType ) |
|
1472 |
{ |
|
1473 |
case UICC_APDU_CONTROL: |
|
1474 |
{ |
|
1475 |
if( UICC_CONTROL_CARD_ACTIVATE == action ) |
|
1476 |
{ |
|
1477 |
// Sets flag, that when the response for this request is |
|
1478 |
// received traid is not removed from the list, until |
|
1479 |
// UICC_APDU_RESET_IND is received. |
|
1480 |
iDoNotRemoveTransactionID = ETrue; |
|
1481 |
} |
|
1482 |
// Create subblock UICC_SB_APDU_ACTIONS. |
|
1483 |
CreateUiccSbApduActions( |
|
1484 |
isiMsg, |
|
1485 |
action ); |
|
1486 |
numOfSubblocks = 1; |
|
1487 |
break; |
|
1488 |
} |
|
1489 |
case UICC_APDU_SEND: |
|
1490 |
{ |
|
1491 |
// create SB UICC_SB_APDU. |
|
1492 |
CreateUiccSbApdu( |
|
1493 |
isiMsg, |
|
1494 |
KUiccApduReqSubblockOffset, |
|
1495 |
aParams .apduData ); |
|
1496 |
numOfSubblocks = 1; |
|
1497 |
break; |
|
1498 |
} |
|
1499 |
default: |
|
1500 |
{ |
|
1501 |
break; |
|
1502 |
} |
|
1503 |
} |
|
1504 |
||
1505 |
isiMsg.Set8bit( |
|
1506 |
ISI_HEADER_SIZE + UICC_APDU_REQ_OFFSET_NSB, |
|
1507 |
numOfSubblocks ); |
|
1508 |
||
1509 |
ret = iPhoNetSender->Send( isiMsg.Complete() ); |
|
1510 |
} |
|
1511 |
else |
|
1512 |
{ |
|
1513 |
ret = KErrServerBusy; |
|
1514 |
} |
|
1515 |
return ret; |
|
1516 |
} |
|
1517 |
||
1518 |
// ----------------------------------------------------------------------------- |
|
1519 |
// CMmUiccMessHandler::CreateUiccSbApduActions |
|
1520 |
// (other items were commented in a header). |
|
1521 |
// ----------------------------------------------------------------------------- |
|
1522 |
// |
|
1523 |
void CMmUiccMessHandler::CreateUiccSbApduActions( |
|
1524 |
TIsiSend& aIsiMsg, |
|
1525 |
TUint8 aAction ) |
|
1526 |
{ |
|
1527 |
TFLOGSTRING("TSY: CMmUiccMessHandler::CreateUiccSbApduActions"); |
|
1528 |
OstTrace0( TRACE_NORMAL, CMMUICCMESSHANDLER_CREATEUICCASBPDUACTION, "CMmUiccMessHandler::CreateUiccSbApduActions" ); |
|
1529 |
||
1530 |
// SIZE_UICC_SB_APPLICATION_STR |
|
1531 |
TBuf8<SIZE_UICC_SB_APDU_ACTIONS> uiccSbApduActionBuf( 0 ); |
|
1532 |
TIsiSubBlock uiccSbApduAction( |
|
1533 |
uiccSbApduActionBuf, |
|
1534 |
UICC_SB_APDU_ACTIONS, |
|
1535 |
EIsiSubBlockTypeId16Len16 ); |
|
1536 |
||
1537 |
// Action |
|
1538 |
uiccSbApduActionBuf.Append( aAction ); |
|
1539 |
// 3x filler |
|
1540 |
uiccSbApduActionBuf.Append( KUiccPadding ); |
|
1541 |
uiccSbApduActionBuf.Append( KUiccPadding ); |
|
1542 |
uiccSbApduActionBuf.Append( KUiccPadding ); |
|
1543 |
||
1544 |
// Append subblock to ISI message |
|
1545 |
aIsiMsg.CopyData( |
|
1546 |
KUiccApduReqSubblockOffset, |
|
1547 |
uiccSbApduAction.CompleteSubBlock() ); |
|
1548 |
} |
|
1549 |
||
1550 |
// ----------------------------------------------------------------------------- |
|
1551 |
// CMmUiccMessHandler::GetAPduData |
|
1552 |
// (other items were commented in a header). |
|
1553 |
// ----------------------------------------------------------------------------- |
|
1554 |
// |
|
1555 |
const TPtrC8 CMmUiccMessHandler::GetApduData( const TIsiReceiveC& aIsiMsg ) |
|
1556 |
{ |
|
1557 |
TFLOGSTRING("TSY: CMmUiccMessHandler::GetApduData"); |
|
1558 |
OstTrace0( TRACE_NORMAL, CMMUICCMESSHANDLER_GETAPDUDATA, "CMmUiccMessHandler::GetApduData" ); |
|
1559 |
||
1560 |
TPtrC8 data( KNullDesC8 ); |
|
1561 |
||
1562 |
// File data from UICC_SB_APDU |
|
1563 |
TUint uiccSbApduOffset( 0 ); |
|
1564 |
if ( KErrNone == aIsiMsg.FindSubBlockOffsetById( |
|
1565 |
ISI_HEADER_SIZE + SIZE_UICC_APPL_CMD_REQ, |
|
1566 |
UICC_SB_APDU, |
|
1567 |
EIsiSubBlockTypeId16Len16, |
|
1568 |
uiccSbApduOffset ) ) |
|
1569 |
{ |
|
1570 |
TInt apduDataLength( aIsiMsg.Get16bit( |
|
1571 |
uiccSbApduOffset + KUiccSbApduLengthOffset ) ); |
|
1572 |
||
1573 |
data.Set( aIsiMsg.GetData( |
|
1574 |
uiccSbApduOffset + KUiccSbApduDataOffset, |
|
1575 |
apduDataLength ) ); |
|
1576 |
} |
|
1577 |
return data; |
|
1578 |
} |
|
1579 |
||
1580 |
// ----------------------------------------------------------------------------- |
|
1581 |
// CMmUiccMessHandler::CreateUiccSbApdu |
|
1582 |
// (other items were commented in a header). |
|
1583 |
// ----------------------------------------------------------------------------- |
|
1584 |
// |
|
1585 |
void CMmUiccMessHandler::CreateUiccSbApdu( |
|
1586 |
TIsiSend& aIsiMsg, |
|
1587 |
TUint8 aMsgOffset, |
|
1588 |
const TDesC8& aAPDUData) |
|
1589 |
{ |
|
1590 |
TFLOGSTRING("TSY: CMmUiccMessHandler::CreateUiccSbApdu" ); |
|
1591 |
OstTrace0( TRACE_NORMAL, CMMUICCMESSHANDLER_CREATESBAPDU, "CMmUiccMessHandler::CreateUiccSbApdu" ); |
|
1592 |
||
1593 |
// UICC_SB_APDU subblock |
|
1594 |
TBuf8<KUiccSbApduSize> uiccSbApduBuf( 0 ); |
|
1595 |
TIsiSubBlock uiccSbApdu( |
|
1596 |
uiccSbApduBuf, |
|
1597 |
UICC_SB_APDU, |
|
1598 |
EIsiSubBlockTypeId16Len16 ); |
|
1599 |
||
1600 |
// Force APDU command |
|
1601 |
uiccSbApduBuf.Append( UICC_APDU_CMD_FORCE_NOT_USED ); |
|
1602 |
||
1603 |
// Filler KUiccPadding |
|
1604 |
uiccSbApduBuf.Append( KUiccPadding ); |
|
1605 |
||
1606 |
// Length of APDU command data, 16-bit |
|
1607 |
TInt length( aAPDUData.Length() ); |
|
1608 |
uiccSbApduBuf.Append( static_cast<TInt8>( length >> 8 ) ); |
|
1609 |
uiccSbApduBuf.Append( static_cast<TInt8>( length ) ); |
|
1610 |
||
1611 |
// Data |
|
1612 |
uiccSbApduBuf.Append( aAPDUData ); |
|
1613 |
||
1614 |
// Append subblock to ISI message |
|
1615 |
aIsiMsg.CopyData( aMsgOffset, uiccSbApdu.CompleteSubBlock() ); |
|
1616 |
} |
|
1617 |
||
1618 |
// ----------------------------------------------------------------------------- |
|
1619 |
// CMmUiccMessHandler::CreateUiccCardReq |
|
1620 |
// (other items were commented in a header). |
|
1621 |
// ----------------------------------------------------------------------------- |
|
1622 |
// |
|
1623 |
TInt CMmUiccMessHandler::CreateUiccCardReq( const TUiccParamsBase& aParams ) |
|
1624 |
{ |
|
1625 |
TFLOGSTRING("TSY: CMmUiccMessHandler::CreateUiccCardReq" ); |
|
1626 |
OstTrace0( TRACE_NORMAL, CMMUICCMESSHANDLER_CREATECARDREQ, "CMmUiccMessHandler::CreateUiccCardReq" ); |
|
1627 |
||
1628 |
TInt ret ( KErrGeneral ); |
|
1629 |
TInt trId( aParams.trId ); |
|
1630 |
TInt8 serviceType( aParams.serviceType ); |
|
1631 |
||
1632 |
// If there is the previous request ongoing (pointer was already set for |
|
1633 |
// this operation) we can't handle this request. |
|
1634 |
if ( NULL == iMessHandlerPrtList.At( trId ) ) |
|
1635 |
{ |
|
1636 |
// Save pointer to message handler, it is needed when receiving |
|
1637 |
// respone for this operation |
|
1638 |
iMessHandlerPrtList[trId] = aParams.messHandlerPtr; |
|
1639 |
||
1640 |
// Create UICC_CARD_REQ message |
|
1641 |
TIsiSend isiMsg( iPhoNetSender->SendBufferDes() ); |
|
1642 |
isiMsg.Set8bit( ISI_HEADER_OFFSET_RESOURCEID, PN_UICC ); |
|
1643 |
isiMsg.Set8bit( |
|
1644 |
ISI_HEADER_SIZE + UICC_CARD_REQ_OFFSET_TRANSID, |
|
1645 |
trId ); |
|
1646 |
isiMsg.Set8bit( ISI_HEADER_SIZE + UICC_CARD_REQ_OFFSET_MESSAGEID, |
|
1647 |
UICC_CARD_REQ ); |
|
1648 |
isiMsg.Set8bit( ISI_HEADER_SIZE + UICC_CARD_REQ_OFFSET_SERVICETYPE, |
|
1649 |
serviceType ); |
|
1650 |
isiMsg.Set8bit( ISI_HEADER_SIZE + UICC_CARD_REQ_OFFSET_CARDTYPE, |
|
1651 |
iCardType ); |
|
1652 |
||
1653 |
return( iPhoNetSender->Send( isiMsg.Complete() ) ); |
|
1654 |
} |
|
1655 |
else |
|
1656 |
{ |
|
1657 |
ret = KErrServerBusy; |
|
1658 |
} |
|
1659 |
return ret; |
|
1660 |
} |
|
1661 |
||
1662 |
// ----------------------------------------------------------------------------- |
|
1663 |
// CMmUiccMessHandler::InitializeSimServiceTableCache |
|
1664 |
// (other items were commented in a header). |
|
1665 |
// ----------------------------------------------------------------------------- |
|
1666 |
// |
|
5
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
1667 |
void CMmUiccMessHandler::InitializeSimServiceTableCache( TBool aComplete ) |
0 | 1668 |
{ |
1669 |
TFLOGSTRING("TSY: CMmUiccMessHandler::InitializeSimServiceTableCache" ); |
|
1670 |
OstTrace0( TRACE_NORMAL, CMMUICCMESSHANDLER_INITIALIZESIMSERVICETABLECACHE, "CMmUiccMessHandler::InitializeSimServiceTableCache" ); |
|
1671 |
||
5
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
1672 |
// Service table internal cacheing is done during strtup and SIM refresh. |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
1673 |
// Completing of IPC EMmTsyBootNotifySimStatusReadyIPC is done only |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
1674 |
// in case of startup. |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
1675 |
iCompleteSimStatusReady = aComplete; |
0 | 1676 |
// Set parameters for UICC_APPL_CMD_REQ message |
1677 |
TUiccReadTransparent params; |
|
1678 |
params.messHandlerPtr = static_cast<MUiccOperationBase*>( this ); |
|
1679 |
params.trId = ETrIdSstCache; |
|
1680 |
params.dataAmount = 0; |
|
1681 |
params.dataOffset = 0; |
|
1682 |
params.fileId = KElemSimServiceTable; |
|
1683 |
||
1684 |
// If card type is UICC, we need to read EFust, otherwise EFsst |
|
1685 |
// EFust contains SFI identifier (value is 4), but EFsst doesn't |
|
1686 |
// contain SFI, so in that case we need to use UICC_SFI_NOT_PRESENT |
|
1687 |
params.fileIdSfi = iCardType == UICC_CARD_TYPE_UICC ? 4 : UICC_SFI_NOT_PRESENT; |
|
1688 |
params.serviceType = UICC_APPL_READ_TRANSPARENT; |
|
1689 |
||
1690 |
// File id path |
|
1691 |
params.filePath.Append( KMasterFileId >> 8 ); |
|
1692 |
params.filePath.Append( KMasterFileId ); |
|
1693 |
params.filePath.Append( GetApplicationFileId() ); |
|
1694 |
||
1695 |
CreateUiccApplCmdReq( params ); |
|
1696 |
} |
|
1697 |
||
1698 |
// ----------------------------------------------------------------------------- |
|
1699 |
// CMmUiccMessHandler::SimServiceTableCacheResp |
|
1700 |
// (other items were commented in a header). |
|
1701 |
// ----------------------------------------------------------------------------- |
|
1702 |
// |
|
1703 |
void CMmUiccMessHandler::SimServiceTableCacheResp( |
|
1704 |
TInt aStatus, |
|
1705 |
const TDesC8& aFileData ) |
|
1706 |
{ |
|
1707 |
TFLOGSTRING("TSY: CMmUiccMessHandler::SimServiceTableCacheResp" ); |
|
1708 |
OstTrace0( TRACE_NORMAL, CMMUICCMESSHANDLER_SIMSERVICETABLECACHERESP, "CMmUiccMessHandler::SimServiceTableCacheResp" ); |
|
1709 |
||
1710 |
if ( UICC_STATUS_OK == aStatus ) |
|
1711 |
{ |
|
1712 |
if ( UICC_CARD_TYPE_UICC == iCardType ) |
|
1713 |
{ |
|
1714 |
// fill iUstFile |
|
1715 |
iUSTFile.Copy( aFileData ); |
|
1716 |
} |
|
1717 |
else if ( UICC_CARD_TYPE_ICC == iCardType ) |
|
1718 |
{ |
|
1719 |
// fill iSstFile |
|
1720 |
iSSTFile.Copy( aFileData ); |
|
1721 |
} |
|
1722 |
else |
|
1723 |
{ |
|
1724 |
TFLOGSTRING("TSY: CMmUiccMessHandler::SimServiceTableCacheResp unknown card type, cache not done" ); |
|
1725 |
OstTrace0( TRACE_NORMAL, DUP1_CMMUICCMESSHANDLER_SIMSERVICETABLECACHERESP, "CMmUiccMessHandler::SimServiceTableCacheResp unknown card type, cache not done" ); |
|
1726 |
} |
|
1727 |
} |
|
1728 |
else |
|
1729 |
{ |
|
1730 |
TFLOGSTRING2("TSY: CMmUiccMessHandler::SimServiceTableCacheResp: reading failed (0x%x)", aStatus ); |
|
1731 |
OstTrace1( TRACE_NORMAL, DUP2_CMMUICCMESSHANDLER_SIMSERVICETABLECACHERESP, "CMmUiccMessHandler::SimServiceTableCacheResp: reading failed (%x)", aStatus ); |
|
1732 |
} |
|
1733 |
||
5
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
1734 |
// Cacheing during startup |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
1735 |
if ( iCompleteSimStatusReady ) |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
1736 |
{ |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
1737 |
//Complete Notify SIM Ready |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
1738 |
iMessageRouter->Complete( |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
1739 |
EMmTsyBootNotifySimStatusReadyIPC, |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
1740 |
KErrNone ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
1741 |
} |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
1742 |
else // Cacheing from SIM refresh |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
1743 |
{ |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
1744 |
iMessageRouter->GetPhoneMessHandler()-> |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
1745 |
ServiceTableCachingCompleted( aStatus ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
1746 |
iCompleteSimStatusReady = ETrue; // Default value |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
1747 |
} |
0 | 1748 |
} |
1749 |
||
1750 |
// ----------------------------------------------------------------------------- |
|
1751 |
// CMmUiccMessHandler::GetServiceStatus |
|
1752 |
// (other items were commented in a header). |
|
1753 |
// |
|
1754 |
TBool CMmUiccMessHandler::GetServiceStatus( TUint8 aServiceNo ) |
|
1755 |
{ |
|
1756 |
TFLOGSTRING2("TSY: CMmUiccMessHandler::GetServiceStatus for card: ox%x", iCardType ); |
|
1757 |
OstTrace1( TRACE_NORMAL, CMMUICCMESSHANDLER_GETSERVICESTATUS, "CMmUiccMessHandler::GetServiceStatus for card: ox%x", iCardType ); |
|
1758 |
||
1759 |
TBool ret( EFalse ); |
|
1760 |
||
1761 |
if( UICC_CARD_TYPE_UICC == iCardType ) |
|
1762 |
{ |
|
1763 |
// card type UICC, so service status info is in |
|
1764 |
// EFust. Service info is coded as one bit, |
|
1765 |
// for example first byte contains services 1-8 as: |
|
1766 |
// bit: b8 b7 b6 b5 b4 b3 b2 b1 |
|
1767 |
// service no: 08 07 06 05 04 03 02 01 |
|
1768 |
// If bit is 1, service is supported |
|
1769 |
// For more info about EFust, see 3GPP spec 31.102 |
|
1770 |
||
1771 |
// let's calculate index to get correct byte |
|
1772 |
// which contains info about service requested |
|
1773 |
TUint8 index( ( aServiceNo - 1 ) / 8 ); |
|
1774 |
||
1775 |
//let's calculate the bit number which contains |
|
1776 |
// service info |
|
1777 |
TUint8 bit( ( aServiceNo - 1 ) % 8 ); |
|
1778 |
||
1779 |
// form mask to get is service supported or not |
|
1780 |
TUint8 mask( 1<<bit ); |
|
1781 |
||
1782 |
if( iUSTFile.Length() > index ) |
|
1783 |
{ |
|
1784 |
// If result is > 0, service is supported |
|
1785 |
if( iUSTFile[index] & mask ) |
|
1786 |
{ |
|
1787 |
TFLOGSTRING2("TSY: CMmUiccMessHandler::GetServiceStatus: UICC service (%d) supported", aServiceNo ); |
|
1788 |
OstTrace1( TRACE_NORMAL, DUP1_CMMUICCMESSHANDLER_GETSERVICESTATUS, "CMmUiccMessHandler::GetServiceStatus: UICC service (%d) supported", aServiceNo ); |
|
1789 |
ret = ETrue; |
|
1790 |
} |
|
1791 |
} |
|
1792 |
} |
|
1793 |
else if( UICC_CARD_TYPE_ICC == iCardType ) |
|
1794 |
{ |
|
1795 |
// card type ICC, so service status info is in |
|
1796 |
// EFsst. Service info is coded as two bits, |
|
1797 |
// for example first byte contains services 1-4 as: |
|
1798 |
// bit: b8 b7 b6 b5 b4 b3 b2 b1 |
|
1799 |
// service no: 04 04 03 03 02 02 01 01 |
|
1800 |
||
1801 |
// first bit describes is service allocated |
|
1802 |
// second bit describes is service activated |
|
1803 |
// for example service no 4: first bit is b7 |
|
1804 |
// and second bit is b8. Both bits needs to be |
|
1805 |
// 1 so that service is supported. For more |
|
1806 |
// info about EFsst, see 3GPP spec 51.011 |
|
1807 |
||
1808 |
// let's calculate index to get correct byte |
|
1809 |
// which contains info about service requested |
|
1810 |
TUint8 index( ( aServiceNo - 1 ) / 4 ); |
|
1811 |
||
1812 |
//let's calculate the bit number which contains |
|
1813 |
// service info |
|
1814 |
TUint8 bit( ( aServiceNo - 1 ) % 4 ); |
|
1815 |
||
1816 |
// form mask to get is service supported or not. |
|
1817 |
TUint8 mask( 3<<( bit * 2 ) ); |
|
1818 |
||
1819 |
if( iSSTFile.Length() > index ) |
|
1820 |
{ |
|
1821 |
// If both bits are 1, service is supported |
|
1822 |
if( ( iSSTFile[index] & mask ) == mask ) |
|
1823 |
{ |
|
1824 |
TFLOGSTRING2("TSY: CMmUiccMessHandler::GetServiceStatus: ICC service (%d) supported", aServiceNo ); |
|
1825 |
OstTrace1( TRACE_NORMAL, DUP2_CMMUICCMESSHANDLER_GETSERVICESTATUS, "CMmUiccMessHandler::GetServiceStatus: ICC service (%d) supported", aServiceNo ); |
|
1826 |
ret = ETrue; |
|
1827 |
} |
|
1828 |
} |
|
1829 |
} |
|
1830 |
return ret; |
|
1831 |
} |
|
1832 |
||
1833 |
// ----------------------------------------------------------------------------- |
|
1834 |
// CMmUiccMessHandler::ProcessUiccMsg |
|
1835 |
// Handles data received from UICC server |
|
1836 |
// ----------------------------------------------------------------------------- |
|
1837 |
// |
|
1838 |
TInt CMmUiccMessHandler::ProcessUiccMsg( |
|
1839 |
TInt aTraId, |
|
1840 |
TInt aStatus, |
|
5
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
1841 |
TUint8 /*aDetails*/, |
0 | 1842 |
const TDesC8& aFileData ) |
1843 |
{ |
|
1844 |
TFLOGSTRING3("TSY: CMmUiccMessHandler::ProcessUiccMsg, transaction ID: %d, status: %d", aTraId, aStatus ); |
|
1845 |
OstTrace1( TRACE_NORMAL, CMMUICCMESSHANDLER_PROCESSUICCMSG, "CMmUiccMessHandler::ProcessUiccMsg, transaction ID: %d", aTraId ); |
|
1846 |
OstTrace1( TRACE_NORMAL, DUP2_CMMUICCMESSHANDLER_PROCESSUICCMSG, "CMmUiccMessHandler::ProcessUiccMsg, status: %d", aStatus ); |
|
1847 |
||
1848 |
TInt ret( KErrNone ); |
|
1849 |
||
1850 |
switch( aTraId ) |
|
1851 |
{ |
|
1852 |
case ETrIdSstCache: |
|
1853 |
{ |
|
1854 |
SimServiceTableCacheResp( aStatus, aFileData ); |
|
1855 |
break; |
|
1856 |
} |
|
1857 |
case ETrIdCphsCache: |
|
1858 |
{ |
|
1859 |
CphsInformationCacheResp( aStatus, aFileData ); |
|
1860 |
break; |
|
1861 |
} |
|
1862 |
default: |
|
1863 |
{ |
|
1864 |
TFLOGSTRING("TSY: CMmUiccMessHandler::ProcessUiccMsg, unknown transaction ID" ); |
|
1865 |
OstTrace0( TRACE_NORMAL, DUP1_CMMUICCMESSHANDLER_PROCESSUICCMSG, "CMmUiccMessHandler::ProcessUiccMsg, unknown transaction ID" ); |
|
1866 |
break; |
|
1867 |
} |
|
1868 |
} |
|
1869 |
||
1870 |
return ret; |
|
1871 |
} |
|
1872 |
||
1873 |
// ----------------------------------------------------------------------------- |
|
1874 |
// CMmUiccMessHandler::StorePinKeyReferences |
|
1875 |
// (other items were commented in a header). |
|
1876 |
// ----------------------------------------------------------------------------- |
|
1877 |
// |
|
1878 |
void CMmUiccMessHandler::StorePinKeyReferences( const TDesC8& aFileData ) |
|
1879 |
{ |
|
1880 |
TFLOGSTRING("TSY: CMmUiccMessHandler::StorePinKeyReferences" ); |
|
1881 |
OstTrace0( TRACE_NORMAL, CMMUICCMESSHANDLER_STOREPINKEYREFERENCES, "CMmUiccMessHandler::StorePinKeyReferences" ); |
|
5
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
1882 |
|
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
1883 |
// Get offset for PIN Status Template DO |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
1884 |
TFci fci( aFileData ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
1885 |
TInt pSTDoOffset( fci.GetOffsetOfTLV( KPINStatusTemplateDO ) ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
1886 |
|
0 | 1887 |
// See ETSI TS 102 221 V7.11.0 (2008-07)chapter 9.5.2 |
1888 |
// There is only one PIN1/PIN2/UPIN per application |
|
5
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
1889 |
TUint8 lengthOfPs( aFileData[( pSTDoOffset + 3 )] ); // Number of PS bytes is in index 3 |
0 | 1890 |
|
1891 |
// Get PS_DO for PIN statuses |
|
1892 |
TPtrC8 psDo; |
|
5
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
1893 |
psDo.Set( aFileData.Mid( ( pSTDoOffset + 4 ), lengthOfPs ) ); |
0 | 1894 |
|
1895 |
// Update index to point the first PIN |
|
5
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
1896 |
TUint8 index( pSTDoOffset + 4 + lengthOfPs ); |
0 | 1897 |
TUint8 pinId( 0 ); |
1898 |
TUint8 orderNum( 0 ); // Used for shifting PIN status byte |
|
1899 |
TBool upinExists( EFalse ); |
|
1900 |
TBool pin1Active( EFalse ); |
|
1901 |
||
5
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
1902 |
TInt totalLength( aFileData[( pSTDoOffset + 1 )]); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
1903 |
// Length of PIN data is total length - PS_DO tag - PS_DO tag length - |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
1904 |
// PS_DO tag bytes. |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
1905 |
TInt length( totalLength - 1 - 1 - lengthOfPs ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
1906 |
for ( TInt i( 0 ); i < length; i++ ) |
0 | 1907 |
{ |
1908 |
// Check if usage qualifier exists ( tag '95'). In that case skip it |
|
5
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
1909 |
if ( 0x95 == aFileData[index] ) |
0 | 1910 |
{ |
1911 |
index += 3; |
|
1912 |
length -= 3; |
|
1913 |
} |
|
1914 |
// PIN key reference |
|
5
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
1915 |
pinId = aFileData[index + 2]; |
0 | 1916 |
index += 3; // Skip PIN key reference data element |
1917 |
length -= 3; |
|
1918 |
||
1919 |
// Store PIN ID |
|
1920 |
if ( 1 <= pinId && 8 >= pinId ) // It is PIN1 |
|
1921 |
{ |
|
1922 |
iPin1Id = pinId; |
|
1923 |
// Check if PIN1 is enabled ( the active PIN ) |
|
1924 |
if ( 0x80 & ( psDo[0] << orderNum ) ) |
|
1925 |
{ |
|
1926 |
iActivePin = RMobilePhone::ESecurityCodePin1; |
|
1927 |
pin1Active = ETrue; |
|
1928 |
} |
|
1929 |
} |
|
1930 |
else if ( 0x81 <= pinId && 0x88 >= pinId ) // It is PIN2 |
|
1931 |
{ |
|
1932 |
iPin2Id = pinId; |
|
1933 |
orderNum++; |
|
1934 |
} |
|
1935 |
else if ( 0x11 == pinId ) |
|
1936 |
{ |
|
1937 |
upinExists = ETrue; |
|
1938 |
orderNum++; |
|
1939 |
} |
|
1940 |
// No else |
|
1941 |
} |
|
1942 |
||
1943 |
// If PIN1 is not set as active and UPIN exists, UPIN is the active PIN |
|
1944 |
if ( upinExists && !pin1Active ) |
|
1945 |
{ |
|
1946 |
iActivePin = RMobilePhone::ESecurityUniversalPin; |
|
1947 |
} |
|
1948 |
} |
|
1949 |
||
1950 |
// ----------------------------------------------------------------------------- |
|
1951 |
// CMmUiccMessHandler::GetPin1KeyReference |
|
1952 |
// (other items were commented in a header). |
|
1953 |
// ----------------------------------------------------------------------------- |
|
1954 |
// |
|
1955 |
TUint8 CMmUiccMessHandler::GetPin1KeyReference() |
|
1956 |
{ |
|
1957 |
TFLOGSTRING("TSY: CMmUiccMessHandler::GetPin1KeyReference" ); |
|
1958 |
OstTrace0( TRACE_NORMAL, CMMUICCMESSHANDLER_GETPIN1KEYREFERENCE, "CMmUiccMessHandler::GetPin1KeyReference" ); |
|
1959 |
return iPin1Id; |
|
1960 |
} |
|
1961 |
||
1962 |
// ----------------------------------------------------------------------------- |
|
1963 |
// CMmUiccMessHandler::GetPin1KeyReference |
|
1964 |
// (other items were commented in a header). |
|
1965 |
// ----------------------------------------------------------------------------- |
|
1966 |
// |
|
1967 |
TUint8 CMmUiccMessHandler::GetPin2KeyReference() |
|
1968 |
{ |
|
1969 |
TFLOGSTRING("TSY: CMmUiccMessHandler::GetPin2KeyReference" ); |
|
1970 |
OstTrace0( TRACE_NORMAL, CMMUICCMESSHANDLER_GETPIN2KEYREFERENCE, "CMmUiccMessHandler::GetPin2KeyReference" ); |
|
1971 |
return iPin2Id; |
|
1972 |
} |
|
1973 |
||
1974 |
// ----------------------------------------------------------------------------- |
|
1975 |
// CMmUiccMessHandler::GetActivePin |
|
1976 |
// (other items were commented in a header). |
|
1977 |
// ----------------------------------------------------------------------------- |
|
1978 |
// |
|
1979 |
RMobilePhone::TMobilePhoneSecurityCode CMmUiccMessHandler::GetActivePin() |
|
1980 |
{ |
|
1981 |
TFLOGSTRING("TSY: CMmUiccMessHandler::GetActivePin" ); |
|
1982 |
OstTrace0( TRACE_NORMAL, CMMUICCMESSHANDLER_GETACTIVEPIN, "CMmUiccMessHandler::GetActivePin" ); |
|
1983 |
return iActivePin; |
|
1984 |
} |
|
1985 |
||
1986 |
// ----------------------------------------------------------------------------- |
|
1987 |
// CMmUiccMessHandler::ChangeActivePin() |
|
1988 |
// (other items were commented in a header). |
|
1989 |
// ----------------------------------------------------------------------------- |
|
1990 |
// |
|
1991 |
void CMmUiccMessHandler::ChangeActivePin() |
|
1992 |
{ |
|
1993 |
TFLOGSTRING("TSY: CMmUiccMessHandler::ChangeActivePin" ); |
|
1994 |
OstTrace0( TRACE_NORMAL, CMMUICCMESSHANDLER_CHANGEACTIVEPIN, "CMmUiccMessHandler::ChangeActivePin" ); |
|
1995 |
// Change the internal flag indicating which PIN is active |
|
1996 |
if ( RMobilePhone::ESecurityCodePin1 == iActivePin ) |
|
1997 |
{ |
|
1998 |
iActivePin = RMobilePhone::ESecurityUniversalPin; |
|
1999 |
} |
|
2000 |
else if ( RMobilePhone::ESecurityUniversalPin == iActivePin ) |
|
2001 |
{ |
|
2002 |
iActivePin = RMobilePhone::ESecurityCodePin1; |
|
2003 |
} |
|
2004 |
} |
|
2005 |
||
2006 |
// ----------------------------------------------------------------------------- |
|
2007 |
// CMmUiccMessHandler::InitializeCphsInformationCache |
|
2008 |
// (other items were commented in a header). |
|
2009 |
// ----------------------------------------------------------------------------- |
|
2010 |
// |
|
2011 |
void CMmUiccMessHandler::InitializeCphsInformationCache() |
|
2012 |
{ |
|
2013 |
TFLOGSTRING("TSY: CMmUiccMessHandler::InitializeCphsInformationCache" ); |
|
2014 |
OstTrace0( TRACE_NORMAL, CMMUICCMESSHANDLER_INITIALIZECPHSINFORMATIONCACHE, "CMmUiccMessHandler::InitializeCphsInformationCache" ); |
|
2015 |
||
2016 |
// CPHS information is read only in case of ICC card |
|
2017 |
if( UICC_CARD_TYPE_ICC == iCardType ) |
|
2018 |
{ |
|
2019 |
// Set parameters for UICC_APPL_CMD_REQ message |
|
2020 |
TUiccReadTransparent params; |
|
2021 |
params.messHandlerPtr = static_cast<MUiccOperationBase*>( this ); |
|
2022 |
params.trId = ETrIdCphsCache; |
|
2023 |
params.dataAmount = 0; |
|
2024 |
params.dataOffset = 0; |
|
2025 |
params.fileId = KElemCphsInformation; |
|
2026 |
params.fileIdSfi = UICC_SFI_NOT_PRESENT; |
|
2027 |
params.serviceType = UICC_APPL_READ_TRANSPARENT; |
|
2028 |
||
2029 |
// File id path |
|
2030 |
params.filePath.Append( KMasterFileId >> 8 ); |
|
2031 |
params.filePath.Append( KMasterFileId ); |
|
2032 |
params.filePath.Append( GetApplicationFileId() ); |
|
2033 |
||
2034 |
CreateUiccApplCmdReq( params ); |
|
2035 |
} |
|
2036 |
} |
|
2037 |
||
2038 |
// ----------------------------------------------------------------------------- |
|
2039 |
// CMmUiccMessHandler::CphsInformationCacheResp |
|
2040 |
// (other items were commented in a header). |
|
2041 |
// ----------------------------------------------------------------------------- |
|
2042 |
// |
|
2043 |
void CMmUiccMessHandler::CphsInformationCacheResp( |
|
2044 |
TInt aStatus, |
|
2045 |
const TDesC8& aFileData ) |
|
2046 |
{ |
|
2047 |
TFLOGSTRING("TSY: CMmUiccMessHandler::CphsInformationCacheResp" ); |
|
2048 |
OstTrace0( TRACE_NORMAL, CMMUICCMESSHANDLER_CPHSINFORMATIONCACHERESP, "CMmUiccMessHandler::CphsInformationCacheResp" ); |
|
2049 |
||
2050 |
if ( UICC_STATUS_OK == aStatus ) |
|
2051 |
{ |
|
2052 |
// First byte of CPHS information is for CPHS phase, lbut |
|
5
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2053 |
// we are interested in only CPHS table, so we skip the |
0 | 2054 |
// first byte and we just copy the CPHS table data |
2055 |
TUint8 dataSize( aFileData.Length() - 1 ); |
|
2056 |
if( KEfCphsInfoSize >= dataSize ) |
|
2057 |
{ |
|
2058 |
iCPHSInformation.Copy( aFileData.Mid( 1, dataSize ) ); |
|
2059 |
} |
|
2060 |
else |
|
2061 |
{ |
|
2062 |
TFLOGSTRING3("TSY: CMmUiccMessHandler::CphsInformationCacheResp: buffer too small (expected: %d, actual: %d), cannot store CPHS info", dataSize, iCPHSInformation.Length() ); |
|
2063 |
OstTrace0( TRACE_NORMAL, DUP3_CMMUICCMESSHANDLER_CPHSINFORMATIONCACHERESP, "CMmUiccMessHandler::CphsInformationCacheResp: buffer too small, cannot store CPHS info" ); |
|
2064 |
OstTrace1( TRACE_NORMAL, DUP2_CMMUICCMESSHANDLER_CPHSINFORMATIONCACHERESP, "CMmUiccMessHandler::CphsInformationCacheResp: expected size: %d", dataSize ); |
|
2065 |
OstTrace1( TRACE_NORMAL, DUP4_CMMUICCMESSHANDLER_CPHSINFORMATIONCACHERESP, "CMmUiccMessHandler::CphsInformationCacheResp: actual size: %d", iCPHSInformation.Length() ); |
|
2066 |
} |
|
2067 |
} |
|
2068 |
else |
|
2069 |
{ |
|
2070 |
TFLOGSTRING2("TSY: CMmUiccMessHandler::CphsInformationCacheResp: reading failed (0x%x)", aStatus ); |
|
2071 |
OstTrace1( TRACE_NORMAL, DUP1_CMMUICCMESSHANDLER_CPHSINFORMATIONCACHERESP, "CMmUiccMessHandler::CphsInformationCacheResp: reading failed (0x%x)", aStatus ); |
|
2072 |
} |
|
2073 |
} |
|
2074 |
||
2075 |
// ----------------------------------------------------------------------------- |
|
2076 |
// CMmUiccMessHandler::GetCphsInformationStatus |
|
2077 |
// (other items were commented in a header). |
|
2078 |
// ----------------------------------------------------------------------------- |
|
2079 |
// |
|
2080 |
TBool CMmUiccMessHandler::GetCphsInformationStatus( TUint8 aServiceNo ) |
|
2081 |
{ |
|
2082 |
TFLOGSTRING("TSY: CMmUiccMessHandler::GetCphsInformationStatus" ); |
|
2083 |
OstTrace0( TRACE_NORMAL, DUP1_CMMUICCMESSHANDLER_GETCPHSINFORMATIONSTATUS, "CMmUiccMessHandler::GetCphsInformationStatus" ); |
|
2084 |
||
2085 |
TBool ret( EFalse ); |
|
2086 |
||
2087 |
// CPHS info is coded as two bits, |
|
2088 |
// for example first byte contains services 1-4 as: |
|
2089 |
// bit: b8 b7 b6 b5 b4 b3 b2 b1 |
|
2090 |
// service no: 04 04 03 03 02 02 01 01 |
|
2091 |
||
2092 |
// first bit describes is service allocated |
|
2093 |
// second bit describes is service activated |
|
2094 |
// for example service no 4: first bit is b7 |
|
2095 |
// and second bit is b8. Both bits needs to be |
|
2096 |
// 1 so that service is supported. For more |
|
2097 |
// info about CPHS info, see CPHS Phase 2 specification |
|
2098 |
||
2099 |
// let's calculate index to get correct byte |
|
2100 |
// which contains info about service requested |
|
2101 |
TUint8 index( ( aServiceNo - 1 ) / 4 ); |
|
2102 |
||
2103 |
// let's calculate the bit number which contains |
|
2104 |
// service info |
|
2105 |
TUint8 bit( ( aServiceNo - 1 ) % 4 ); |
|
2106 |
||
2107 |
// form mask to get is service supported or not. |
|
2108 |
TUint8 mask( 3<<( bit * 2 ) ); |
|
2109 |
||
2110 |
if( iCPHSInformation.Length() > index ) |
|
2111 |
{ |
|
2112 |
// If both bits are 1, service is supported |
|
2113 |
if( ( iCPHSInformation[index] & mask ) == mask ) |
|
2114 |
{ |
|
2115 |
TFLOGSTRING2("TSY: CMmUiccMessHandler::GetCphsInformationStatus: CPHS service (%d) supported", aServiceNo ); |
|
2116 |
OstTrace1( TRACE_NORMAL, CMMUICCMESSHANDLER_GETCPHSINFORMATIONSTATUS, "CMmUiccMessHandler::GetCphsInformationStatus: CPHS service (%d) supported", aServiceNo ); |
|
2117 |
ret = ETrue; |
|
2118 |
} |
|
2119 |
} |
|
2120 |
return ret; |
|
2121 |
} |
|
2122 |
||
5
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2123 |
// ----------------------------------------------------------------------------- |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2124 |
// TFci::GetLength |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2125 |
// (other items were commented in a header). |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2126 |
// ----------------------------------------------------------------------------- |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2127 |
// |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2128 |
TInt TFci::GetLength() |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2129 |
{ |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2130 |
TInt lengthOfFCISb( 0 ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2131 |
|
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2132 |
lengthOfFCISb = CMmStaticUtility::Get16Bit( iData, |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2133 |
UICC_SB_FCI_OFFSET_SBLEN ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2134 |
TFLOGSTRING2("TSY: TFci::GetLength lengthOfFCISb = %d", lengthOfFCISb ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2135 |
OstTrace1( TRACE_NORMAL, TFCI_GETLENGTH, "TFci::GetLength;lengthOfFCISb=%d", lengthOfFCISb ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2136 |
|
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2137 |
return lengthOfFCISb; |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2138 |
} |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2139 |
|
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2140 |
// ----------------------------------------------------------------------------- |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2141 |
// TFci::GetTypeOfCard |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2142 |
// (other items were commented in a header). |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2143 |
// ----------------------------------------------------------------------------- |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2144 |
// |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2145 |
TUint8 TFci::GetTypeOfCard() |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2146 |
{ |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2147 |
TUint8 uiccCardType( iData[UICC_SB_FCI_OFFSET_CARDTYPE] ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2148 |
TFLOGSTRING2("TSY: TFci::GetTypeOfCard uiccCardType = %d", uiccCardType ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2149 |
OstTraceExt1( TRACE_NORMAL, TFCI_GETTYPEOFCARD, "TFci::GetTypeOfCard;uiccCardType=%hhu", uiccCardType ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2150 |
|
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2151 |
return uiccCardType; |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2152 |
} |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2153 |
|
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2154 |
// ----------------------------------------------------------------------------- |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2155 |
// TFci::::GetOffsetOfTLV |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2156 |
// (other items were commented in a header). |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2157 |
// ----------------------------------------------------------------------------- |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2158 |
// |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2159 |
TInt TFci::GetOffsetOfTLV( const TUint8 aDescription ) |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2160 |
{ |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2161 |
TFLOGSTRING("TSY: TFci::::GetOffsetOfTLV" ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2162 |
OstTrace0( TRACE_NORMAL, TFCI_GETOFFSETOFTLV, "TFci::GetOffsetOfTLV" ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2163 |
|
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2164 |
TInt indexOfData( 0 ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2165 |
TInt length( GetLength() ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2166 |
|
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2167 |
// Length is 1 or 2 bytes long |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2168 |
// (see TS 102 221 11.1.1.3 Response Data) |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2169 |
// If the 1st byte of length is 0x81 the length is 2 bytes long |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2170 |
|
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2171 |
// Length starts from the 2nd byte of the FCI |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2172 |
indexOfData = UICC_SB_FCI_OFFSET_FCI + 1; |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2173 |
|
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2174 |
// Length is 2 bytes ? Skip the 1st byte |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2175 |
if ( 0x81 == iData[indexOfData] ) |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2176 |
{ |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2177 |
indexOfData++; |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2178 |
} |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2179 |
// Skip the length (1st or 2nd byte depending on the length) |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2180 |
indexOfData++; |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2181 |
|
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2182 |
while ( indexOfData < length ) |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2183 |
{ |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2184 |
if ( aDescription == iData[indexOfData] ) |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2185 |
{ |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2186 |
// Return indexOfData |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2187 |
break; |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2188 |
} |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2189 |
else |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2190 |
{ |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2191 |
// Move index to the start of next descriptor |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2192 |
indexOfData++; // Length of current descriptor |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2193 |
indexOfData += iData[indexOfData] + 1; |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2194 |
} |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2195 |
} |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2196 |
|
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2197 |
// Not found |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2198 |
if ( indexOfData >= length ) |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2199 |
{ |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2200 |
indexOfData = 0; |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2201 |
} |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2202 |
|
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2203 |
return indexOfData; |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2204 |
} |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2205 |
|
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2206 |
// ----------------------------------------------------------------------------- |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2207 |
// TFci::GetNumberOfRecords |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2208 |
// (other items were commented in a header). |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2209 |
// ----------------------------------------------------------------------------- |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2210 |
// |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2211 |
TInt TFci::GetNumberOfRecords() |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2212 |
{ |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2213 |
TFLOGSTRING("TSY: TFci::GetNumberOfRecords" ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2214 |
OstTrace0( TRACE_NORMAL, TFCI_GETNUMBEROFRECORDS, "TFci::GetNumberOfRecords" ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2215 |
|
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2216 |
TInt numberOfRecords( 0 ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2217 |
TUint8 uiccCardType( GetTypeOfCard()); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2218 |
|
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2219 |
if ( UICC_CARD_TYPE_UICC == uiccCardType ) |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2220 |
{ |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2221 |
// Get 3G SIM data see TS 102 221 11.1.1.4.3 File Descriptor |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2222 |
TInt indexOfData( GetOffsetOfTLV( KFileDescriptor ) ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2223 |
|
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2224 |
if ( 0 != indexOfData ) |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2225 |
{ |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2226 |
indexOfData++; // index of the data length |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2227 |
// if data length is 5 there is record count in the 6th byte |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2228 |
if ( 5 == iData[indexOfData] ) |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2229 |
{ |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2230 |
indexOfData += 5; |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2231 |
numberOfRecords = iData[indexOfData]; |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2232 |
} |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2233 |
} |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2234 |
} |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2235 |
else if ( UICC_CARD_TYPE_ICC == uiccCardType ) |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2236 |
{ |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2237 |
TInt fileSize( 0 ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2238 |
fileSize = CMmStaticUtility::Get16Bit( |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2239 |
iData, |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2240 |
( UICC_SB_FCI_OFFSET_FCI + KFileSize2 ) ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2241 |
|
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2242 |
TInt recordLength( 0 ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2243 |
recordLength = iData[( UICC_SB_FCI_OFFSET_FCI + KRecordLength2 )]; |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2244 |
|
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2245 |
// get the No of records |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2246 |
numberOfRecords = ( fileSize/recordLength ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2247 |
} |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2248 |
else |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2249 |
{ |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2250 |
TFLOGSTRING("TSY: TFci::GetNumberOfRecords: UNKNOWN CARD TYPE" ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2251 |
OstTrace0( TRACE_NORMAL, DUP2_TFCI_GETNUMBEROFRECORDS, "TFci::GetNumberOfRecords: UNKNOWN CARD TYPE" ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2252 |
} |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2253 |
|
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2254 |
TFLOGSTRING2("TSY: TFci::GetNumberOfRecords numberOfRecords = %d", numberOfRecords ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2255 |
OstTrace1( TRACE_NORMAL, DUP1_TFCI_GETNUMBEROFRECORDS, "TFci::GetNumberOfRecords;numberOfRecords=%d", numberOfRecords ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2256 |
|
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2257 |
return numberOfRecords; |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2258 |
} |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2259 |
|
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2260 |
// ----------------------------------------------------------------------------- |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2261 |
// TFci::GetRecordLength |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2262 |
// (other items were commented in a header). |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2263 |
// ----------------------------------------------------------------------------- |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2264 |
// |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2265 |
TInt TFci::GetRecordLength() |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2266 |
{ |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2267 |
TFLOGSTRING("TSY: TFci::GetRecordLength" ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2268 |
OstTrace0( TRACE_NORMAL, TFCI_GETRECORDLENGTH, "TFci::GetRecordLength" ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2269 |
|
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2270 |
TInt recordLength( 0 ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2271 |
TUint8 uiccCardType( GetTypeOfCard()); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2272 |
|
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2273 |
if ( UICC_CARD_TYPE_UICC == uiccCardType ) |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2274 |
{ |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2275 |
// Get 3G SIM data see TS 102 221 11.1.1.4.3 File Descriptor |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2276 |
TInt indexOfData( GetOffsetOfTLV( KFileDescriptor ) ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2277 |
|
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2278 |
if ( 0 != indexOfData ) |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2279 |
{ |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2280 |
indexOfData++; // index of the data length |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2281 |
// if data length is 5 there is record length in the |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2282 |
// 4th and 5th byte |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2283 |
if ( 5 == iData[indexOfData] ) |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2284 |
{ |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2285 |
indexOfData += 3; |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2286 |
recordLength = CMmStaticUtility::Get16Bit( iData, |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2287 |
indexOfData ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2288 |
} |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2289 |
} |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2290 |
} |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2291 |
else if ( UICC_CARD_TYPE_ICC == uiccCardType ) |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2292 |
{ |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2293 |
recordLength = iData[( UICC_SB_FCI_OFFSET_FCI + KRecordLength2 )]; |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2294 |
} |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2295 |
else |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2296 |
{ |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2297 |
TFLOGSTRING("TSY: TFci::GetRecordLength: UNKNOWN CARD TYPE" ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2298 |
OstTrace0( TRACE_NORMAL, DUP2_TFCI_GETRECORDLENGTH, "TFci::GetRecordLength: UNKNOWN CARD TYPE" ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2299 |
} |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2300 |
|
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2301 |
TFLOGSTRING2("TSY: TFci::GetRecordLength recordLength = %d", recordLength ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2302 |
OstTrace1( TRACE_NORMAL, DUP1_TFCI_GETRECORDLENGTH, "TFci::GetRecordLength;recordLength=%d", recordLength ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2303 |
|
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2304 |
return recordLength; |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2305 |
} |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2306 |
|
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2307 |
// ----------------------------------------------------------------------------- |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2308 |
// TFci::GetSizeOfFile |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2309 |
// (other items were commented in a header). |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2310 |
// ----------------------------------------------------------------------------- |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2311 |
// |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2312 |
TInt TFci::GetSizeOfFile() |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2313 |
{ |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2314 |
TFLOGSTRING("TSY: TFci::GetSizeOfFile" ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2315 |
OstTrace0( TRACE_NORMAL, TFCI_GETSIZEOFFILE, "TFci::GetSizeOfFile" ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2316 |
|
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2317 |
TInt fileSize( 0 ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2318 |
TUint8 uiccCardType( GetTypeOfCard() ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2319 |
|
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2320 |
if ( UICC_CARD_TYPE_UICC == uiccCardType ) |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2321 |
{ |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2322 |
// Get 3G SIM data see TS 102 221 11.1.1.4.1 File Size |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2323 |
TInt indexOfData( GetOffsetOfTLV( KFileSize ) ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2324 |
|
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2325 |
if ( 0 != indexOfData ) |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2326 |
{ |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2327 |
indexOfData++; // index of the data length |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2328 |
// Data length must be 2 ! |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2329 |
if ( 2 == iData[indexOfData] ) |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2330 |
{ |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2331 |
indexOfData++; |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2332 |
fileSize = CMmStaticUtility::Get16Bit( iData, indexOfData ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2333 |
} |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2334 |
} |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2335 |
} |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2336 |
else if ( UICC_CARD_TYPE_ICC == uiccCardType ) |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2337 |
{ |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2338 |
fileSize = CMmStaticUtility::Get16Bit( |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2339 |
iData, |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2340 |
( UICC_SB_FCI_OFFSET_FCI + KFileSize2 ) ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2341 |
} |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2342 |
else |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2343 |
{ |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2344 |
TFLOGSTRING("TSY: TFci::GetFileSize: UNKNOWN CARD TYPE" ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2345 |
OstTrace0( TRACE_NORMAL, DUP2_TFCI_GETSIZEOFFILE, "TFci::GetSizeOfFile: UNKNOWN CARD TYPE" ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2346 |
} |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2347 |
|
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2348 |
|
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2349 |
TFLOGSTRING2("TSY: TFci::GetSizeOfFile fileSize = %d", fileSize ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2350 |
OstTrace1( TRACE_NORMAL, DUP1_TFCI_GETSIZEOFFILE, "TFci::GetSizeOfFile;fileSize=%d", fileSize ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2351 |
|
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2352 |
return fileSize; |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2353 |
} |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2354 |
|
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2355 |
// ----------------------------------------------------------------------------- |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2356 |
// TFci::GetFileIdentifier |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2357 |
// (other items were commented in a header). |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2358 |
// ----------------------------------------------------------------------------- |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2359 |
// |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2360 |
TInt TFci::GetFileIdentifier() |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2361 |
{ |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2362 |
TFLOGSTRING("TSY: TFci::GetFileIdentifier" ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2363 |
OstTrace0( TRACE_NORMAL, TFCI_GETFILEIDENTIFIER, "TFci::GetFileIdentifier" ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2364 |
|
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2365 |
TInt fileIdentifier( 0 ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2366 |
TUint8 uiccCardType( GetTypeOfCard()); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2367 |
|
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2368 |
if ( UICC_CARD_TYPE_UICC == uiccCardType ) |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2369 |
{ |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2370 |
// Get 3G SIM data see TS 102 221 11.1.1.4.4 File Identifier |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2371 |
TInt indexOfData( GetOffsetOfTLV( KFileIdentifier ) ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2372 |
|
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2373 |
if ( 0 != indexOfData ) |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2374 |
{ |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2375 |
indexOfData++; // index of the data length |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2376 |
// Data length must be 2 ! |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2377 |
if ( 2 == iData[indexOfData] ) |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2378 |
{ |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2379 |
indexOfData++; |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2380 |
fileIdentifier = CMmStaticUtility::Get16Bit( iData, |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2381 |
indexOfData ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2382 |
} |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2383 |
} |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2384 |
} |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2385 |
else if ( UICC_CARD_TYPE_ICC == uiccCardType ) |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2386 |
{ |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2387 |
// 4 is the index location for File ID which is 2 bytes long |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2388 |
fileIdentifier = |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2389 |
CMmStaticUtility::Get16Bit( iData, |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2390 |
( UICC_SB_FCI_OFFSET_FCI + KFileId ) ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2391 |
} |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2392 |
else |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2393 |
{ |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2394 |
TFLOGSTRING("TSY: TFci::GetFileIdentifier: UNKNOWN CARD TYPE" ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2395 |
OstTrace0( TRACE_NORMAL, DUP2_TFCI_GETFILEIDENTIFIER, "TFci::GetFileIdentifier: UNKNOWN CARD TYPE" ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2396 |
} |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2397 |
|
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2398 |
TFLOGSTRING2("TSY: TFci::GetFileIdentifier fileIdentifier = %d", fileIdentifier ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2399 |
OstTrace1( TRACE_NORMAL, DUP1_TFCI_GETFILEIDENTIFIER, "TFci::GetFileIdentifier;fileIdentifier=%d", fileIdentifier ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2400 |
|
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2401 |
return fileIdentifier; |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2402 |
} |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2403 |
|
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2404 |
// ----------------------------------------------------------------------------- |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2405 |
// TFci::GetFileStatus |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2406 |
// (other items were commented in a header). |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2407 |
// ----------------------------------------------------------------------------- |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2408 |
// |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2409 |
TUint8 TFci::GetFileStatus() |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2410 |
{ |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2411 |
TFLOGSTRING("TSY: TFci::GetFileStatus" ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2412 |
OstTrace0( TRACE_NORMAL, TFCI_GETFILESTATUS, "TFci::GetFileStatus" ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2413 |
|
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2414 |
TUint8 fileStatus( 0 ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2415 |
TUint8 uiccCardType( GetTypeOfCard()); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2416 |
|
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2417 |
if ( UICC_CARD_TYPE_UICC == uiccCardType ) |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2418 |
{ |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2419 |
TFLOGSTRING("TSY: TFci::GetFileStatus: NOT IN UICC" ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2420 |
} |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2421 |
else if ( UICC_CARD_TYPE_ICC == uiccCardType ) |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2422 |
{ |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2423 |
// Get 2G SIM data |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2424 |
fileStatus = iData[( UICC_SB_FCI_OFFSET_FCI + KFileStatus )]; |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2425 |
} |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2426 |
else |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2427 |
{ |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2428 |
TFLOGSTRING("TSY: TFci::GetFileStatus: UNKNOWN CARD TYPE" ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2429 |
OstTrace0( TRACE_NORMAL, DUP1_TFCI_GETFILESTATUS, "TFci::GetFileStatus: UNKNOWN CARD TYPE" ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2430 |
} |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2431 |
|
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2432 |
TFLOGSTRING2("TSY: TFci::GetFileStatus fileStatus = %d", fileStatus ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2433 |
OstTraceExt1( TRACE_NORMAL, DUP2_TFCI_GETFILESTATUS, "TFci::GetFileStatus;fileStatus=%hhu", fileStatus ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2434 |
|
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2435 |
return fileStatus; |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2436 |
} |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2437 |
|
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2438 |
// ----------------------------------------------------------------------------- |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2439 |
// CMmUiccMessHandler::GetUiccClientId |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2440 |
// (other items were commented in a header). |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2441 |
// ----------------------------------------------------------------------------- |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2442 |
// |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2443 |
TUint8 CMmUiccMessHandler::GetUiccClientId() |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2444 |
{ |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2445 |
TFLOGSTRING("TSY: CMmUiccMessHandler::GetUiccClientId" ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2446 |
OstTrace0( TRACE_NORMAL, CMMUICCMESSHANDLER_GETUICCCLIENTID, "CMmUiccMessHandler::GetUiccClientId" ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2447 |
return iUiccClientId; |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
2448 |
} |
0 | 2449 |
|
2450 |
// End of File |