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) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). |
|
3 |
* All rights reserved. |
|
4 |
* This component and the accompanying materials are made available |
|
5 |
* under the terms of the License "Eclipse Public License v1.0" |
|
6 |
* which accompanies this distribution, and is available |
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 |
* |
|
9 |
* Initial Contributors: |
|
10 |
* Nokia Corporation - initial contribution. |
|
11 |
* |
|
12 |
* Contributors: |
|
13 |
* |
|
14 |
* Description: |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
||
19 |
||
20 |
// INCLUDES |
|
21 |
#include "cmmpipecontrol.h" |
|
22 |
#include <ctsy/pluginapi/cmmdatapackage.h> |
|
23 |
#include "cmmpacketservicemesshandler.h" |
|
24 |
#include "cmmpacketmesshandlercontextlist.h" |
|
25 |
#include <tisi.h> |
|
26 |
#ifdef INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING |
|
27 |
#include <nsisi.h> |
|
28 |
#endif /* INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING */ |
|
29 |
#include "tsylogger.h" |
|
5
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
30 |
#include "OstTraceDefinitions.h" |
0 | 31 |
#ifdef OST_TRACE_COMPILER_IN_USE |
5
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
32 |
#include "cmmpipecontrolTraces.h" |
0 | 33 |
#endif |
34 |
||
35 |
// EXTERNAL DATA STRUCTURES |
|
36 |
// None |
|
37 |
||
38 |
// EXTERNAL FUNCTION PROTOTYPES |
|
39 |
// None |
|
40 |
||
41 |
// CONSTANTS |
|
42 |
// None |
|
43 |
||
44 |
// MACROS |
|
45 |
// None |
|
46 |
||
47 |
// LOCAL CONSTANTS AND MACROS |
|
48 |
// None |
|
49 |
||
50 |
// MODULE DATA STRUCTURES |
|
51 |
// None |
|
52 |
||
53 |
// LOCAL FUNCTION PROTOTYPES |
|
54 |
// None |
|
55 |
||
56 |
// ==================== LOCAL FUNCTIONS ======================================= |
|
57 |
||
58 |
// None |
|
59 |
||
60 |
// ================= MEMBER FUNCTIONS ========================================= |
|
61 |
||
62 |
// ---------------------------------------------------------------------------- |
|
63 |
// CMmPipeControl::CMmPipeControl |
|
64 |
// C++ default constructor can NOT contain any code, that |
|
65 |
// might leave. |
|
66 |
// ---------------------------------------------------------------------------- |
|
67 |
// |
|
68 |
CMmPipeControl::CMmPipeControl() |
|
69 |
{ |
|
70 |
||
71 |
TFLOGSTRING("TSY: CMmPipeControl::CMmPipeControl"); |
|
72 |
OstTrace0( TRACE_NORMAL, CMMPIPECONTROL_CMMPIPECONTROL, "CMmPipeControl::CMmPipeControl" ); |
|
73 |
} |
|
74 |
||
75 |
// ----------------------------------------------------------------------------- |
|
76 |
// CMmPipeControl::~CMmPipeControl |
|
77 |
// Destructor, deletes all allocated resources. |
|
78 |
// ----------------------------------------------------------------------------- |
|
79 |
// |
|
80 |
CMmPipeControl::~CMmPipeControl() |
|
81 |
{ |
|
82 |
||
83 |
TFLOGSTRING("TSY: CMmPipeControl::~CMmPipeControl"); |
|
84 |
OstTrace0( TRACE_NORMAL, DUP1_CMMPIPECONTROL_CMMPIPECONTROL, "CMmPipeControl::~CMmPipeControl" ); |
|
85 |
} |
|
86 |
||
87 |
// ---------------------------------------------------------------------------- |
|
88 |
// CMmPipeControl::NewL |
|
89 |
// Two-phased constructor. |
|
90 |
// ---------------------------------------------------------------------------- |
|
91 |
// |
|
92 |
CMmPipeControl* CMmPipeControl::NewL( |
|
93 |
CMmPhoNetSender* aPhoNetSender, |
|
94 |
CMmPhoNetReceiver* aPhoNetReceiver, |
|
95 |
CMmPacketContextMessHandler* aMmPacketContextMessHandler, |
|
96 |
CMmPacketContextMesshandlerList* aMmPacketContextMesshandlerList) |
|
97 |
{ |
|
98 |
||
99 |
TFLOGSTRING("TSY: CMmPipeControl::NewL"); |
|
100 |
OstTrace0( TRACE_NORMAL, CMMPIPECONTROL_NEWL, "CMmPipeControl::NewL" ); |
|
101 |
||
102 |
CMmPipeControl* mmPipeControl = new ( ELeave ) CMmPipeControl(); |
|
103 |
||
104 |
CleanupStack::PushL( mmPipeControl ); |
|
105 |
||
106 |
mmPipeControl->iPhoNetSender = aPhoNetSender; |
|
107 |
mmPipeControl->iContextMessHandler = aMmPacketContextMessHandler; |
|
108 |
mmPipeControl->iContextList = aMmPacketContextMesshandlerList; |
|
109 |
||
110 |
mmPipeControl->ConstructL(); |
|
111 |
||
112 |
aPhoNetReceiver->RegisterL( mmPipeControl, PN_PIPE, PNS_PIPE_CREATE_RESP ); |
|
113 |
aPhoNetReceiver->RegisterL( mmPipeControl, PN_PIPE, PNS_PIPE_ENABLE_RESP ); |
|
114 |
aPhoNetReceiver->RegisterL( mmPipeControl, PN_PIPE, PNS_PIPE_RESET_RESP ); |
|
115 |
aPhoNetReceiver->RegisterL( mmPipeControl, PN_PIPE, PNS_PIPE_REMOVE_RESP ); |
|
116 |
||
117 |
#ifdef DUMMY_NIF_PEP_FOR_PACKET_DATA_TESTING_DOS |
|
118 |
||
119 |
aPhoNetReceiver->RegisterL( mmPipeControl, PN_PIPE, PNS_PEP_CONNECT_REQ ); |
|
120 |
aPhoNetReceiver->RegisterL( mmPipeControl, PN_PIPE, PNS_PEP_DISCONNECT_REQ ); |
|
121 |
aPhoNetReceiver->RegisterL( mmPipeControl, PN_PIPE, PNS_PEP_RESET_REQ ); |
|
122 |
aPhoNetReceiver->RegisterL( mmPipeControl, PN_PIPE, PNS_PEP_ENABLE_REQ ); |
|
123 |
||
124 |
#endif //DUMMY_NIF_PEP_FOR_PACKET_DATA_TESTING_DOS |
|
125 |
||
126 |
#ifdef INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING |
|
127 |
aPhoNetReceiver-> |
|
128 |
RegisterL( mmPipeControl, PN_NAMESERVICE, PNS_NAME_QUERY_RESP ); |
|
129 |
#endif /* INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING */ |
|
130 |
||
131 |
CleanupStack::Pop( mmPipeControl ); |
|
132 |
||
133 |
return mmPipeControl; |
|
134 |
} |
|
135 |
||
136 |
// ---------------------------------------------------------------------------- |
|
137 |
// CMmPipeControl::ConstructL |
|
138 |
// Symbian 2nd phase constructor can leave. |
|
139 |
// ---------------------------------------------------------------------------- |
|
140 |
// |
|
141 |
void CMmPipeControl::ConstructL() |
|
142 |
{ |
|
143 |
||
144 |
TFLOGSTRING("TSY: CMmPipeControl::ConstructL"); |
|
145 |
OstTrace0( TRACE_NORMAL, CMMPIPECONTROL_CONSTRUCTL, "CMmPipeControl::ConstructL" ); |
|
146 |
||
147 |
iSecondPepDeviceId = KSecondPepDevice; // Default Device Id of second PEP |
|
148 |
iSecondPepObjectId = KSecondPepObject; // Default Object Id of second PEP |
|
149 |
||
150 |
InitLists(); |
|
151 |
#ifdef INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING |
|
152 |
PnsNameQueryReq(); |
|
153 |
#endif /* INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING */ |
|
154 |
} |
|
155 |
||
156 |
// ----------------------------------------------------------------------------- |
|
157 |
// CMmPipeControl::ReceiveMessageL |
|
158 |
// Entry point for messages received from Domestic OS. |
|
159 |
// Switches the message to the correct method. |
|
160 |
// ----------------------------------------------------------------------------- |
|
161 |
// |
|
162 |
void CMmPipeControl::ReceiveMessageL( const TIsiReceiveC& aIsiMessage ) |
|
163 |
{ |
|
164 |
TInt resource( aIsiMessage.Get8bit( ISI_HEADER_OFFSET_RESOURCEID ) ); |
|
165 |
TInt messageId( aIsiMessage.Get8bit( ISI_HEADER_OFFSET_MESSAGEID ) ); |
|
166 |
||
167 |
TFLOGSTRING3("TSY: CMmPipeControl::ReceiveMessageL - resource: %d, msgId: %d", resource, messageId); |
|
168 |
OstTraceExt2( TRACE_NORMAL, CMMPIPECONTROL_RECEIVEMESSAGEL, "CMmPipeControl::ReceiveMessageL;resource=%d;messageId=%d", resource, messageId ); |
|
169 |
||
170 |
switch ( resource ) |
|
171 |
{ |
|
172 |
case PN_PIPE: |
|
173 |
{ |
|
174 |
switch( messageId ) |
|
175 |
{ |
|
176 |
case PNS_PIPE_CREATE_RESP: |
|
177 |
{ |
|
178 |
PnsPipeCreateResp( aIsiMessage ); |
|
179 |
break; |
|
180 |
} |
|
181 |
case PNS_PIPE_ENABLE_RESP: |
|
182 |
{ |
|
183 |
PnsPipeEnableResp( aIsiMessage ); |
|
184 |
break; |
|
185 |
} |
|
186 |
case PNS_PIPE_RESET_RESP: |
|
187 |
{ |
|
188 |
PnsPipeResetResp( aIsiMessage ); |
|
189 |
break; |
|
190 |
} |
|
191 |
case PNS_PIPE_REMOVE_RESP: |
|
192 |
{ |
|
193 |
PnsPipeRemoveResp( aIsiMessage ); |
|
194 |
break; |
|
195 |
} |
|
196 |
||
197 |
#ifdef DUMMY_NIF_PEP_FOR_PACKET_DATA_TESTING_DOS |
|
198 |
case PNS_PEP_CONNECT_REQ: |
|
199 |
{ |
|
200 |
PnsPepConnectReq( aIsiMessage ); |
|
201 |
break; |
|
202 |
} |
|
203 |
case PNS_PEP_DISCONNECT_REQ: |
|
204 |
{ |
|
205 |
PnsPepDisconnectReq( aIsiMessage ); |
|
206 |
break; |
|
207 |
} |
|
208 |
case PNS_PEP_RESET_REQ: |
|
209 |
{ |
|
210 |
PnsPepResetReq( aIsiMessage ); |
|
211 |
break; |
|
212 |
} |
|
213 |
case PNS_PEP_ENABLE_REQ: |
|
214 |
{ |
|
215 |
PnsPepEnableReq( aIsiMessage ); |
|
216 |
break; |
|
217 |
} |
|
218 |
#endif // DUMMY_NIF_PEP_FOR_PACKET_DATA_TESTING_DOS |
|
219 |
||
220 |
default: |
|
221 |
{ |
|
222 |
||
223 |
TFLOGSTRING2("TSY: CMmPipeControl::ReceiveMessageL - PN_PIPE - unknown msgId: %d", messageId); |
|
224 |
OstTrace1( TRACE_NORMAL, DUP1_CMMPIPECONTROL_RECEIVEMESSAGEL, "CMmPipeControl::ReceiveMessageL;unknown messageId=%d", messageId ); |
|
225 |
break; |
|
226 |
} |
|
227 |
} |
|
228 |
break; |
|
229 |
} |
|
230 |
#ifdef INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING |
|
231 |
case PN_NAMESERVICE: |
|
232 |
{ |
|
233 |
switch( messageId ) |
|
234 |
{ |
|
235 |
case PNS_NAME_QUERY_RESP: |
|
236 |
{ |
|
237 |
PnsNameQueryResp( aIsiMessage ); |
|
238 |
break; |
|
239 |
} |
|
240 |
default: |
|
241 |
{ |
|
242 |
||
243 |
TFLOGSTRING2("TSY: CMmPipeControl::ReceiveMessageL - PN_NAMESERVICE - unknown msgId: %d", messageId); |
|
244 |
OstTrace1( TRACE_NORMAL, DUP2_CMMPIPECONTROL_RECEIVEMESSAGEL, "CMmPipeControl::ReceiveMessageL;unknown messageId=%d", messageId ); |
|
245 |
break; |
|
246 |
} |
|
247 |
} |
|
248 |
break; |
|
249 |
} |
|
250 |
#endif /* INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING */ |
|
251 |
default: |
|
252 |
{ |
|
253 |
||
254 |
TFLOGSTRING2("TSY: CMmPipeControl::ReceiveMessageL - unknown resource: %d", resource); |
|
255 |
OstTrace1( TRACE_NORMAL, DUP3_CMMPIPECONTROL_RECEIVEMESSAGEL, "CMmPipeControl::ReceiveMessageL;unknown resource=%d", resource ); |
|
256 |
break; // server not known |
|
257 |
} |
|
258 |
} // end of switch |
|
259 |
} |
|
260 |
||
261 |
// ---------------------------------------------------------------------------- |
|
262 |
// CMmPipeControl::InitLists |
|
263 |
// Initialize used lists and attributes. |
|
264 |
// ---------------------------------------------------------------------------- |
|
265 |
// |
|
266 |
void CMmPipeControl::InitLists() |
|
267 |
{ |
|
268 |
||
269 |
TFLOGSTRING("TSY: CMmPipeControl::InitLists"); |
|
270 |
OstTrace0( TRACE_NORMAL, CMMPIPECONTROL_INITLISTS, "CMmPipeControl::InitLists" ); |
|
271 |
||
272 |
// Find PipeHandle id from Pipe Operation by PipeHandle List |
|
273 |
for ( TInt i = 0; i < KMmMaxNumberOfPipeHandles; i++ ) |
|
274 |
{ |
|
275 |
// Initialize pipe operation array |
|
276 |
iPipeOperationArray[i].iPipeHandle = KInvalidPipeHandle; |
|
277 |
||
278 |
// Use zero as default value |
|
279 |
iPipeOperationArray[i].iTransId = 0; |
|
280 |
} |
|
281 |
} |
|
282 |
||
283 |
// ---------------------------------------------------------------------------- |
|
284 |
// CMmPipeControl::SetPipeHandle |
|
285 |
// Set Pipe Handle value to the list. |
|
286 |
// ---------------------------------------------------------------------------- |
|
287 |
// |
|
288 |
void CMmPipeControl::SetPipeHandle( |
|
289 |
const TUint8 aPipeHandle ) |
|
290 |
{ |
|
291 |
||
292 |
TFLOGSTRING("TSY: CMmPipeControl::SetPipeHandle"); |
|
293 |
OstTrace0( TRACE_NORMAL, CMMPIPECONTROL_SETPIPEHANDLE, "CMmPipeControl::SetPipeHandle" ); |
|
294 |
||
295 |
// Find PipeHandle id from Pipe Operation by PipeHandle List |
|
296 |
for ( TInt i = 0; i < KMmMaxNumberOfPipeHandles; i++ ) |
|
297 |
{ |
|
298 |
// If KInvalidPipeHandle is same as in iPipeOperationArray list |
|
299 |
if ( KInvalidPipeHandle == iPipeOperationArray[i].iPipeHandle ) |
|
300 |
{ |
|
301 |
// Set pipehandle to the pipe operation list |
|
302 |
iPipeOperationArray[i].iPipeHandle = aPipeHandle; |
|
303 |
// Pipe handle found, break |
|
304 |
i = KMmMaxNumberOfPipeHandles; |
|
305 |
} |
|
306 |
//no else |
|
307 |
} |
|
308 |
} |
|
309 |
||
310 |
// ---------------------------------------------------------------------------- |
|
311 |
// CMmPipeControl::SetTransactionId |
|
312 |
// If pipehandle found set transaction id value to the list. |
|
313 |
// ---------------------------------------------------------------------------- |
|
314 |
// |
|
315 |
void CMmPipeControl::SetTransactionId( |
|
316 |
const TUint8 aPipeHandle, |
|
317 |
const TUint8 aTransId ) |
|
318 |
{ |
|
319 |
||
320 |
TFLOGSTRING("TSY: CMmPipeControl::SetTransactionId"); |
|
321 |
OstTrace0( TRACE_NORMAL, CMMPIPECONTROL_SETTRANSACTIONID, "CMmPipeControl::SetTransactionId" ); |
|
322 |
||
323 |
// Find PipeHandle id from Pipe Operation by PipeHandle List |
|
324 |
for ( TInt i = 0; i < KMmMaxNumberOfPipeHandles; i++ ) |
|
325 |
{ |
|
326 |
// If aPipeHandle is same as in iPipeOperationArray list |
|
327 |
if ( aPipeHandle == iPipeOperationArray[i].iPipeHandle ) |
|
328 |
{ |
|
329 |
// Set aTransId to the pipe operation list |
|
330 |
iPipeOperationArray[i].iTransId = aTransId; |
|
331 |
// Pipe handle found, break |
|
332 |
i = KMmMaxNumberOfPipeHandles; |
|
333 |
} |
|
334 |
//no else |
|
335 |
} |
|
336 |
} |
|
337 |
||
338 |
// ---------------------------------------------------------------------------- |
|
339 |
// CMmPipeControl::TransactionId |
|
340 |
// Returns Transaction id by PipeHandle. |
|
341 |
// ---------------------------------------------------------------------------- |
|
342 |
// |
|
343 |
TUint8 CMmPipeControl::TransactionId( |
|
344 |
const TUint8 aPipeHandle ) const |
|
345 |
{ |
|
346 |
||
347 |
TFLOGSTRING("TSY: CMmPipeControl::TransactionId"); |
|
348 |
OstTrace0( TRACE_NORMAL, CMMPIPECONTROL_TRANSACTIONID, "CMmPipeControl::TransactionId" ); |
|
349 |
||
350 |
TUint8 transId( 0 ); |
|
351 |
||
352 |
// Find PipeHandle from Pipe Operation by PipeHandle List |
|
353 |
for ( TInt i = 0; i < KMmMaxNumberOfPipeHandles; i++ ) |
|
354 |
{ |
|
355 |
// If aPipeHandle is same as in iPipeOperationArray list |
|
356 |
if ( aPipeHandle == iPipeOperationArray[i].iPipeHandle ) |
|
357 |
{ |
|
358 |
// Get transaction id from the PipeOperationArray list |
|
359 |
transId = iPipeOperationArray[i].iTransId; |
|
360 |
// Pipe handle found, break |
|
361 |
i = KMmMaxNumberOfPipeHandles; |
|
362 |
} |
|
363 |
//no else |
|
364 |
} |
|
365 |
// Return Transaction id |
|
366 |
return transId; |
|
367 |
} |
|
368 |
||
369 |
// ---------------------------------------------------------------------------- |
|
370 |
// CMmPipeControl::ResetPipeHandle |
|
371 |
// Remove Pipehandle and Transaction id from the list. |
|
372 |
// ---------------------------------------------------------------------------- |
|
373 |
// |
|
374 |
void CMmPipeControl::ResetPipeHandle( |
|
375 |
const TUint8 aPipeHandle ) |
|
376 |
{ |
|
377 |
||
378 |
TFLOGSTRING("TSY: CMmPipeControl::ResetPipeHandle"); |
|
379 |
OstTrace0( TRACE_NORMAL, CMMPIPECONTROL_RESETPIPEHANDLE, "CMmPipeControl::ResetPipeHandle" ); |
|
380 |
||
381 |
// Find PipeHandle id from Pipe Operation by PipeHandle List |
|
382 |
for ( TInt i = 0; i < KMmMaxNumberOfPipeHandles; i++ ) |
|
383 |
{ |
|
384 |
// If aPipeHandle is same as in iPipeOperationArray list |
|
385 |
if ( aPipeHandle == iPipeOperationArray[i].iPipeHandle ) |
|
386 |
{ |
|
387 |
// Initialize Pipehandle to KInvalidPipeHandle |
|
388 |
iPipeOperationArray[i].iPipeHandle = KInvalidPipeHandle; |
|
389 |
// initialize TransactionId to zero |
|
390 |
iPipeOperationArray[i].iTransId = 0; |
|
391 |
// Pipe handle found, break |
|
392 |
i = KMmMaxNumberOfPipeHandles; |
|
393 |
} |
|
394 |
//no else |
|
395 |
} |
|
396 |
} |
|
397 |
||
398 |
// ---------------------------------------------------------------------------- |
|
399 |
// CMmPipeControl::IsOperationCalled |
|
400 |
// Check if pipe operation for given pipe is outgoing |
|
401 |
// ---------------------------------------------------------------------------- |
|
402 |
// |
|
403 |
TBool CMmPipeControl::IsOperationCalled( |
|
404 |
const TUint8 aPipeHandle ) const |
|
405 |
{ |
|
406 |
||
407 |
TFLOGSTRING("TSY: CMmPipeControl::IsOperationCalled"); |
|
408 |
OstTrace0( TRACE_NORMAL, CMMPIPECONTROL_ISOPERATIONCALLED, "CMmPipeControl::IsOperationCalled" ); |
|
409 |
||
410 |
TBool ret( EFalse); |
|
411 |
||
412 |
// Find PipeHandle id from PipeHandle List |
|
413 |
for ( TInt i = 0; i < KMmMaxNumberOfPipeHandles; i++ ) |
|
414 |
{ |
|
415 |
if ( aPipeHandle == iPipeOperationArray[i].iPipeHandle ) |
|
416 |
{ |
|
417 |
// PipeHandle id found, return true |
|
418 |
ret = ETrue; |
|
419 |
} |
|
420 |
} |
|
421 |
// PipeHandle id not found, return false |
|
422 |
return ret; |
|
423 |
} |
|
424 |
||
425 |
#ifdef INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING |
|
426 |
// ---------------------------------------------------------------------------- |
|
427 |
// CMmPipeControl::PnsNameQueryReq |
|
428 |
// Construct a PNS_NAME_QUERY_REQ ISI-message |
|
429 |
// ---------------------------------------------------------------------------- |
|
430 |
// |
|
431 |
TInt CMmPipeControl::PnsNameQueryReq() const |
|
432 |
{ |
|
433 |
||
434 |
TFLOGSTRING("TSY: CMmPipeControl::PnsNameQueryReq"); |
|
435 |
OstTrace0( TRACE_NORMAL, CMMPIPECONTROL_PNSNAMEQUERYREQ, "CMmPipeControl::PnsNameQueryReq" ); |
|
436 |
||
437 |
// create buffer for isi msg data |
|
438 |
TBuf8<SIZE_PNS_NAME_QUERY_REQ> data; |
|
439 |
// set message data |
|
440 |
data.Append( KGpdsPadding ); // Padding byte |
|
441 |
data.Append( KGpdsPadding ); // Padding byte |
|
442 |
data.Append( KGpdsPadding ); // Padding byte |
|
443 |
data.Append( KGpdsPadding ); // Padding byte |
|
444 |
data.Append( KGpdsPadding ); // Padding byte |
|
445 |
data.Append( PN_GPRS ); // Gprs server |
|
446 |
data.Append( KGpdsPadding ); // Padding byte |
|
447 |
data.Append( KGpdsPadding ); // Padding byte |
|
448 |
data.Append( KGpdsPadding ); // Padding byte |
|
449 |
data.Append( PN_GPRS ); // Gprs server |
|
450 |
||
451 |
// set dummyTransactionId value to 0x0F |
|
452 |
TUint8 dummyTransactionId( KDummyTrId ); |
|
453 |
||
454 |
// Sending message to phonet |
|
455 |
return iPhoNetSender->Send( |
|
456 |
PN_NAMESERVICE, dummyTransactionId, PNS_NAME_QUERY_REQ, data ); |
|
457 |
} |
|
458 |
||
459 |
// ---------------------------------------------------------------------------- |
|
460 |
// CMmPipeControl::PnsNameQueryResp |
|
461 |
// Breaks a PNS_NAME_QUERY_RESP ISI-message |
|
462 |
// ---------------------------------------------------------------------------- |
|
463 |
// |
|
464 |
void CMmPipeControl::PnsNameQueryResp( |
|
465 |
const TIsiReceiveC& aIsiMessage ) |
|
466 |
{ |
|
467 |
||
468 |
TUint16 matchesInThisMsg( aIsiMessage.Get16bit( |
|
469 |
ISI_HEADER_SIZE + PNS_NAME_QUERY_RESP_OFFSET_MATCHESINMSG ) ); |
|
470 |
||
471 |
TFLOGSTRING2("TSY: CMmPipeControl::PnsNameQueryResp - matches in this msg: %d", matchesInThisMsg); |
|
472 |
OstTraceExt1( TRACE_NORMAL, CMMPIPECONTROL_PNSNAMEQUERYRESP, "CMmPipeControl::PnsNameQueryResp;matchesInThisMsg=%hu", matchesInThisMsg ); |
|
473 |
||
474 |
if ( 0 < matchesInThisMsg ) |
|
475 |
{ |
|
476 |
for ( TInt i = 0; i < matchesInThisMsg; i++ ) |
|
477 |
{ |
|
478 |
// each match is represented as 8-byte record => |
|
479 |
// recordIndex = i * SIZE_PN_NAME_SRV_ITEM_STR |
|
480 |
// name is 4 bytes => |
|
481 |
// last byte index = PN_NAME_SRV_ITEM_STR_OFFSET_NAME + KLastByteIndex |
|
482 |
TInt recordIndex( i * SIZE_PN_NAME_SRV_ITEM_STR ); |
|
483 |
TUint8 name( aIsiMessage.Get8bit( |
|
484 |
ISI_HEADER_SIZE + PNS_NAME_QUERY_RESP_OFFSET_NAMEENTRYTBL + |
|
485 |
recordIndex + ( PN_NAME_SRV_ITEM_STR_OFFSET_NAME + KLastByteIndex ) ) ); |
|
486 |
if ( PN_GPRS == name ) |
|
487 |
{ |
|
488 |
// Get and store SecondPepDevice id and SecondPepObject id |
|
489 |
iSecondPepDeviceId = aIsiMessage.Get8bit( |
|
490 |
ISI_HEADER_SIZE + PNS_NAME_QUERY_RESP_OFFSET_NAMEENTRYTBL + |
|
491 |
recordIndex + PN_NAME_SRV_ITEM_STR_OFFSET_DEV ); |
|
492 |
iSecondPepObjectId = aIsiMessage.Get8bit( |
|
493 |
ISI_HEADER_SIZE + PNS_NAME_QUERY_RESP_OFFSET_NAMEENTRYTBL + |
|
494 |
recordIndex + PN_NAME_SRV_ITEM_STR_OFFSET_OBJ ); |
|
495 |
// then find right server, stop finding |
|
496 |
i = matchesInThisMsg; |
|
497 |
||
498 |
TFLOGSTRING3("TSY: CMmPipeControl::PnsNameQueryResp. SecondPepDeviceId: %d SecondPepObjectId: %d", iSecondPepDeviceId, iSecondPepObjectId ); |
|
499 |
OstTraceExt2( TRACE_NORMAL, DUP1_CMMPIPECONTROL_PNSNAMEQUERYRESP, "CMmPipeControl::PnsNameQueryResp;iSecondPepDeviceId=%hhu;iSecondPepObjectId=%hhu", iSecondPepDeviceId, iSecondPepObjectId ); |
|
500 |
||
501 |
} |
|
502 |
//no else |
|
503 |
} |
|
504 |
} |
|
505 |
//no else |
|
506 |
} |
|
507 |
||
508 |
#endif /* INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING */ |
|
509 |
||
510 |
// ---------------------------------------------------------------------------- |
|
511 |
// CMmPipeControl::PnsPipeCreateReq |
|
512 |
// Construct a PNS_PIPE_CREATE_REQ ISI-message |
|
513 |
// ---------------------------------------------------------------------------- |
|
514 |
// |
|
515 |
TInt CMmPipeControl::PnsPipeCreateReq( |
|
516 |
const TUint8 aTransId, |
|
517 |
const TUint8 aPipeState, |
|
518 |
const TUint8 aFirstPepObject ) const |
|
519 |
{ |
|
520 |
||
521 |
TFLOGSTRING2("TSY: CMmPipeControl::PnsPipeCreateReq. TransactionId: %d", aTransId ); |
|
522 |
OstTraceExt1( TRACE_NORMAL, CMMPIPECONTROL_PNSPIPECREATEREQ, "CMmPipeControl::PnsPipeCreateReq;aTransId=%hhu", aTransId ); |
|
523 |
||
524 |
// create buffer for isi msg data |
|
525 |
#ifdef INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING |
|
526 |
TBuf8<SIZE_PNS_PIPE_CREATE_REQ> data; |
|
527 |
#else /* INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING */ |
|
528 |
TBuf8<SIZE_CM_PIPE_CREATE_REQ> data; |
|
529 |
#endif /* INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING */ |
|
530 |
// set message data |
|
531 |
data.Append( aPipeState ); |
|
532 |
data.Append( KGpdsPadding ); |
|
533 |
data.Append( KFirstPepDevice ); |
|
534 |
data.Append( aFirstPepObject ); |
|
535 |
data.Append( KFirstPepType ); |
|
536 |
data.Append( KGpdsPadding ); |
|
537 |
data.Append( iSecondPepDeviceId ); |
|
538 |
data.Append( iSecondPepObjectId ); |
|
539 |
data.Append( KSecondPepType ); |
|
540 |
data.Append( KGpdsPadding ); |
|
541 |
||
542 |
// Sending message to phonet |
|
543 |
return iPhoNetSender->Send( |
|
544 |
PN_PIPE, aTransId, PNS_PIPE_CREATE_REQ, data ); |
|
545 |
} |
|
546 |
||
547 |
// ---------------------------------------------------------------------------- |
|
548 |
// CMmPipeControl::PnsPipeCreateResp |
|
549 |
// Breaks a PNS_PIPE_CREATE_RESP ISI-message. |
|
550 |
// ---------------------------------------------------------------------------- |
|
551 |
// |
|
552 |
void CMmPipeControl::PnsPipeCreateResp( |
|
553 |
const TIsiReceiveC& aIsiMessage ) |
|
554 |
{ |
|
555 |
TFLOGSTRING("TSY: CMmPipeControl::PnsPipeCreateResp"); |
|
556 |
OstTrace0( TRACE_NORMAL, CMMPIPECONTROL_PNSPIPECREATERESP, "CMmPipeControl::PnsPipeCreateResp" ); |
|
557 |
||
558 |
// Get transaction Id |
|
559 |
TUint8 transId( aIsiMessage.Get8bit( ISI_HEADER_OFFSET_TRANSID ) ); |
|
560 |
||
561 |
TInt ret = iContextList->PipeCreateTransIdOkByTransId( transId ); |
|
562 |
||
563 |
if ( KErrNone == ret ) |
|
564 |
{ |
|
565 |
#ifdef INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING |
|
566 |
TUint8 pipeHandle( aIsiMessage.Get8bit( |
|
567 |
ISI_HEADER_SIZE + PNS_PIPE_CREATE_RESP_OFFSET_PIPEHANDLE ) ); |
|
568 |
TUint8 errorCode( aIsiMessage.Get8bit( |
|
569 |
ISI_HEADER_SIZE + PNS_PIPE_CREATE_RESP_OFFSET_ERRORCODE ) ); |
|
570 |
#else /* INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING */ |
|
571 |
TUint8 pipeHandle( aIsiMessage.Get8bit( |
|
572 |
ISI_HEADER_SIZE + CM_PIPE_CREATE_RESP_OFFSET_PIPEHANDLE ) ); |
|
573 |
TUint8 errorCode( aIsiMessage.Get8bit( |
|
574 |
ISI_HEADER_SIZE + CM_PIPE_CREATE_RESP_OFFSET_ERRORCODE ) ); |
|
575 |
#endif /* INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING */ |
|
576 |
||
577 |
TFLOGSTRING4("TSY: CMmPipeControl::PnsPipeCreateResp. TransactionId: %d, PipeHandle: %d, error code: %d", transId, pipeHandle, errorCode ); |
|
578 |
OstTraceExt3( TRACE_NORMAL, DUP1_CMMPIPECONTROL_PNSPIPECREATERESP, "CMmPipeControl::PnsPipeCreateResp;transId=%hhu;pipeHandle=%hhu;errorCode=%hhu", transId, pipeHandle, errorCode ); |
|
579 |
||
580 |
// Check PIPE Error Code |
|
581 |
if ( PN_PIPE_ERR_GENERAL == errorCode ) |
|
582 |
{ |
|
583 |
#ifdef INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING |
|
584 |
TUint8 pep1ErrorCode( aIsiMessage.Get8bit( |
|
585 |
ISI_HEADER_SIZE + PNS_PIPE_CREATE_RESP_OFFSET_PEP1ERRORCODE ) ); |
|
586 |
TUint8 pep2ErrorCode( aIsiMessage.Get8bit( |
|
587 |
ISI_HEADER_SIZE + PNS_PIPE_CREATE_RESP_OFFSET_PEP2ERRORCODE ) ); |
|
588 |
#else /* INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING */ |
|
589 |
TUint8 pep1ErrorCode( aIsiMessage.Get8bit( |
|
590 |
ISI_HEADER_SIZE + CM_PIPE_CREATE_RESP_OFFSET_PEP1ERRORCODE ) ); |
|
591 |
TUint8 pep2ErrorCode( aIsiMessage.Get8bit( |
|
592 |
ISI_HEADER_SIZE + CM_PIPE_CREATE_RESP_OFFSET_PEP2ERRORCODE ) ); |
|
593 |
#endif /* INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING */ |
|
594 |
// Check PEP Error Codes |
|
595 |
if ( pep1ErrorCode == PN_PIPE_ERR_PEP_IN_USE || |
|
596 |
pep1ErrorCode == PN_PIPE_ERR_ALL_PIPES_IN_USE || |
|
597 |
pep2ErrorCode == PN_PIPE_ERR_PEP_IN_USE || |
|
598 |
pep2ErrorCode == PN_PIPE_ERR_ALL_PIPES_IN_USE ) |
|
599 |
{ |
|
600 |
||
601 |
TFLOGSTRING("TSY: CMmPipeControl::PnsPipeCreateResp. ErrorCode changed to PN_PIPE_ERR_ALL_PIPES_IN_USE" ); |
|
602 |
OstTrace0( TRACE_NORMAL, DUP2_CMMPIPECONTROL_PNSPIPECREATERESP, "CMmPipeControl::PnsPipeCreateResp, ErrorCode changed to PN_PIPE_ERR_ALL_PIPES_IN_USE" ); |
|
603 |
// PEP can't create more pipes (all pipes in use), |
|
604 |
// error value is updated here |
|
605 |
errorCode = PN_PIPE_ERR_ALL_PIPES_IN_USE; |
|
606 |
} |
|
607 |
//no else |
|
608 |
} |
|
609 |
//no else |
|
610 |
||
611 |
iContextMessHandler->CompletePipeOperation( |
|
612 |
PNS_PIPE_CREATE_RESP, |
|
613 |
transId, |
|
614 |
pipeHandle, |
|
615 |
errorCode ); |
|
616 |
} |
|
617 |
//no else |
|
618 |
} |
|
619 |
||
620 |
// ---------------------------------------------------------------------------- |
|
621 |
// CMmPipeControl::PnsPipeEnableReq |
|
622 |
// Construct a PNS_PIPE_ENABLE_REQ ISI-message. |
|
623 |
// ---------------------------------------------------------------------------- |
|
624 |
// |
|
625 |
TInt CMmPipeControl::PnsPipeEnableReq( |
|
626 |
const CMmDataPackage& aPackage ) const |
|
627 |
{ |
|
628 |
TFLOGSTRING("TSY: CMmPipeControl::PnsPipeEnableReq"); |
|
629 |
OstTrace0( TRACE_NORMAL, CMMPIPECONTROL_PNSPIPEENABLEREQ, "CMmPipeControl::PnsPipeEnableReq" ); |
|
630 |
||
631 |
TInfoName* contextName = NULL; |
|
632 |
aPackage.UnPackData( &contextName ); |
|
633 |
||
634 |
TInt ret( KErrServerBusy ); |
|
635 |
||
636 |
if( NULL != contextName ) |
|
637 |
{ |
|
638 |
||
639 |
TFLOGSTRING2("TSY: CMmPipeControl::PnsPipeEnableReq - context name: %S", contextName); |
|
640 |
OstTraceExt1( TRACE_NORMAL, DUP1_CMMPIPECONTROL_PNSPIPEENABLEREQ, "CMmPipeControl::PnsPipeEnableReq;contextName=%S", *contextName ); |
|
641 |
||
642 |
TUint8 pipehandle( iContextList->PipeHandleByContextName(contextName) ); |
|
643 |
||
644 |
TUint8 traId( iContextList->ProxyIdByContextName( contextName ) ); |
|
645 |
||
646 |
TFLOGSTRING2("TSY: CMmPipeControl::PnsPipeEnableReq. PipeHandle: %d", pipehandle ); |
|
647 |
OstTraceExt1( TRACE_NORMAL, DUP2_CMMPIPECONTROL_PNSPIPEENABLEREQ, "CMmPipeControl::PnsPipeEnableReq;pipehandle=%hhu", pipehandle ); |
|
648 |
||
649 |
// Check if Pipe operation is not outstanding. IsOperationCalled is EFalse |
|
650 |
if ( !IsOperationCalled( pipehandle ) ) |
|
651 |
{ |
|
652 |
// Create buffer for isi msg data |
|
653 |
#ifdef INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING |
|
654 |
TBuf8<SIZE_PNS_PIPE_ENABLE_REQ> data; |
|
655 |
#else /* INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING */ |
|
656 |
TBuf8<SIZE_CM_PIPE_ENABLE_REQ> data; |
|
657 |
#endif /* INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING */ |
|
658 |
data.Append( pipehandle ); |
|
659 |
data.Append( KGpdsPadding ); |
|
660 |
||
661 |
// Send Isi message via phonet |
|
662 |
ret = iPhoNetSender->Send( |
|
663 |
PN_PIPE, traId, PNS_PIPE_ENABLE_REQ, data ); |
|
664 |
} |
|
665 |
//no else |
|
666 |
} |
|
667 |
//no else |
|
668 |
||
669 |
return ret; |
|
670 |
} |
|
671 |
||
672 |
// ---------------------------------------------------------------------------- |
|
673 |
// CMmPipeControl::PnsPipeEnableResp |
|
674 |
// Breaks a PNS_PIPE_ENABLE_RESP ISI-message. |
|
675 |
// ---------------------------------------------------------------------------- |
|
676 |
// |
|
677 |
void CMmPipeControl::PnsPipeEnableResp( |
|
678 |
const TIsiReceiveC& aIsiMessage ) |
|
679 |
{ |
|
680 |
TFLOGSTRING("TSY: CMmPipeControl::PnsPipeEnableResp"); |
|
681 |
OstTrace0( TRACE_NORMAL, DUP1_CMMPIPECONTROL_PNSPIPEENABLERESP, "CMmPipeControl::PnsPipeEnableResp" ); |
|
682 |
// Get Transaction Id from the ISI message |
|
683 |
TUint8 transId( aIsiMessage.Get8bit( ISI_HEADER_OFFSET_TRANSID ) ); |
|
684 |
||
685 |
// pipe control handles only messages for NIF pipes |
|
686 |
TInt ret = iContextList->PipeCreateTransIdOkByTransId( transId ); |
|
687 |
||
688 |
if ( KErrNone == ret ) |
|
689 |
{ |
|
690 |
// Get Pipehandle from the ISI message |
|
691 |
TUint8 pipeHandle( aIsiMessage.Get8bit( |
|
692 |
#ifdef INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING |
|
693 |
ISI_HEADER_SIZE + PNS_PIPE_ENABLE_RESP_OFFSET_PIPEHANDLE ) ); |
|
694 |
// Get Errorcode from the ISI message |
|
695 |
TUint8 errorCode( aIsiMessage.Get8bit( |
|
696 |
ISI_HEADER_SIZE + PNS_PIPE_ENABLE_RESP_OFFSET_ERRORCODE ) ); |
|
697 |
#else /* INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING */ |
|
698 |
ISI_HEADER_SIZE + CM_PIPE_ENABLE_RESP_OFFSET_PIPEHANDLE ) ); |
|
699 |
// Get Errorcode from the ISI message |
|
700 |
TUint8 errorCode( aIsiMessage.Get8bit( |
|
701 |
ISI_HEADER_SIZE + CM_PIPE_ENABLE_RESP_OFFSET_ERRORCODE ) ); |
|
702 |
#endif /* INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING */ |
|
703 |
||
704 |
TFLOGSTRING4("TSY: CMmPipeControl::PnsPipeEnableResp - traId: %d, PipeHandle: %d, ErrorCode: %d", transId, pipeHandle, errorCode ); |
|
705 |
OstTraceExt3( TRACE_NORMAL, CMMPIPECONTROL_PNSPIPEENABLERESP, "CMmPipeControl::PnsPipeEnableResp;transId=%hhu;pipeHandle=%hhu;errorCode=%hhu", transId, pipeHandle, errorCode ); |
|
706 |
||
707 |
iContextMessHandler->CompletePipeOperation( |
|
708 |
PNS_PIPE_ENABLE_RESP, |
|
709 |
transId, |
|
710 |
pipeHandle, |
|
711 |
errorCode ); |
|
712 |
} |
|
713 |
// no else |
|
714 |
} |
|
715 |
||
716 |
// ---------------------------------------------------------------------------- |
|
717 |
// CMmPipeControl::PnsPipeResetReq |
|
718 |
// Construct a PNS_PIPE_RESET_REQ ISI-message. |
|
719 |
// ---------------------------------------------------------------------------- |
|
720 |
// |
|
721 |
TInt CMmPipeControl::PnsPipeResetReq( |
|
722 |
const TUint8 aTransId, |
|
723 |
const TUint8 aPipeHandle, |
|
724 |
const TUint8 aStateAfterReset ) |
|
725 |
{ |
|
726 |
TFLOGSTRING2("TSY: CMmPipeControl::PnsPipeResetReq. PipeHandle: %d", aPipeHandle ); |
|
727 |
OstTraceExt1( TRACE_NORMAL, CMMPIPECONTROL_PNSPIPERESETREQ, "CMmPipeControl::PnsPipeResetReq;aPipeHandle=%hhu", aPipeHandle ); |
|
728 |
||
729 |
// Set ret to KErrServerBusy |
|
730 |
TInt ret( KErrServerBusy ); |
|
731 |
||
732 |
// Check if Pipe operation is not outstanding. IsOperationCalled is EFalse |
|
733 |
if ( !IsOperationCalled( aPipeHandle ) ) |
|
734 |
{ |
|
735 |
// Create buffer for isi msg data |
|
736 |
#ifdef INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING |
|
737 |
TBuf8<SIZE_PNS_PIPE_RESET_REQ> data; |
|
738 |
#else /* INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING */ |
|
739 |
TBuf8<SIZE_CM_PIPE_RESET_REQ> data; |
|
740 |
#endif /* INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING */ |
|
741 |
data.Append( aPipeHandle ); |
|
742 |
data.Append( aStateAfterReset ); |
|
743 |
||
744 |
// Send Isi message via phonet |
|
745 |
ret = iPhoNetSender->Send( |
|
746 |
PN_PIPE, aTransId, PNS_PIPE_RESET_REQ, data ); |
|
747 |
||
748 |
if ( KErrNone == ret ) |
|
749 |
{ |
|
750 |
SetPipeHandle( aPipeHandle ); |
|
751 |
} |
|
752 |
//no else |
|
753 |
} |
|
754 |
//no else |
|
755 |
||
756 |
return ret; |
|
757 |
} |
|
758 |
||
759 |
// ---------------------------------------------------------------------------- |
|
760 |
// CMmPipeControl::PnsPipeResetResp |
|
761 |
// Breaks a PNS_PIPE_RESET_RESP ISI-message. |
|
762 |
// ---------------------------------------------------------------------------- |
|
763 |
// |
|
764 |
void CMmPipeControl::PnsPipeResetResp( |
|
765 |
const TIsiReceiveC& aIsiMessage ) |
|
766 |
{ |
|
767 |
TFLOGSTRING("TSY: CMmPipeControl::PnsPipeResetResp"); |
|
768 |
OstTrace0( TRACE_NORMAL, DUP2_CMMPIPECONTROL_PNSPIPERESETRESP, "CMmPipeControl::PnsPipeResetResp" ); |
|
769 |
// Get Transaction Id from the ISI message |
|
770 |
TUint8 transId( aIsiMessage.Get8bit( ISI_HEADER_OFFSET_TRANSID ) ); |
|
771 |
||
772 |
// pipe control handles only messages for NIF pipes |
|
773 |
TInt ret = iContextList->PipeCreateTransIdOkByTransId( transId ); |
|
774 |
||
775 |
if ( KErrNone == ret ) |
|
776 |
{ |
|
777 |
// Get Pipehandle from the ISI message |
|
778 |
TUint8 pipeHandle( aIsiMessage.Get8bit( |
|
779 |
#ifdef INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING |
|
780 |
ISI_HEADER_SIZE + PNS_PIPE_RESET_RESP_OFFSET_PIPEHANDLE ) ); |
|
781 |
#else /* INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING */ |
|
782 |
ISI_HEADER_SIZE + CM_PIPE_RESET_RESP_OFFSET_PIPEHANDLE ) ); |
|
783 |
#endif /* INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING */ |
|
784 |
||
785 |
TFLOGSTRING3("TSY: CMmPipeControl::PnsPipeResetResp - traId: %d, pipe handle: %d", transId, pipeHandle); |
|
786 |
OstTraceExt2( TRACE_NORMAL, CMMPIPECONTROL_PNSPIPERESETRESP, "CMmPipeControl::PnsPipeResetResp;transId=%hhu;pipeHandle=%hhu", transId, pipeHandle ); |
|
787 |
||
788 |
// Call TransactionId |
|
789 |
TUint8 removeTransId( TransactionId( pipeHandle ) ); |
|
790 |
// Call ResetPipeHandle -method from CMmPipeControl |
|
791 |
ResetPipeHandle( pipeHandle ); |
|
792 |
||
793 |
if ( KUnknownTransID != removeTransId ) |
|
794 |
{ |
|
795 |
// Context has called the PnsPipeRemoveReq that was buffered |
|
796 |
PnsPipeRemoveReq( removeTransId, pipeHandle ); |
|
797 |
} |
|
798 |
//no else |
|
799 |
||
800 |
// Check req is valid by Transaction id |
|
801 |
TInt ret( iContextList->CheckAndResetPipeResetTraId( transId ) ); |
|
802 |
||
803 |
if ( KErrNone == ret ) |
|
804 |
{ |
|
805 |
TUint8 errorCode( aIsiMessage.Get8bit( |
|
806 |
#ifdef INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING |
|
807 |
ISI_HEADER_SIZE + PNS_PIPE_RESET_RESP_OFFSET_ERRORCODE ) ); |
|
808 |
#else /* INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING */ |
|
809 |
ISI_HEADER_SIZE + CM_PIPE_RESET_RESP_OFFSET_ERRORCODE ) ); |
|
810 |
#endif /* INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING */ |
|
811 |
||
812 |
TFLOGSTRING3("TSY: CMmPipeControl::PnsPipeResetResp. PipeHandle: %d ErrorCode: %d", pipeHandle, errorCode ); |
|
813 |
OstTraceExt2( TRACE_NORMAL, DUP1_CMMPIPECONTROL_PNSPIPERESETRESP, "CMmPipeControl::PnsPipeResetResp;pipeHandle=%hhu;errorCode=%hhu", pipeHandle, errorCode ); |
|
814 |
iContextMessHandler->CompletePipeOperation( |
|
815 |
PNS_PIPE_RESET_RESP, |
|
816 |
transId, |
|
817 |
pipeHandle, |
|
818 |
errorCode ); |
|
819 |
} |
|
820 |
//no else |
|
821 |
} |
|
822 |
// no else |
|
823 |
} |
|
824 |
||
825 |
// ---------------------------------------------------------------------------- |
|
826 |
// CMmPipeControl::PnsPipeRemoveReq |
|
827 |
// Construct a PNS_PIPE_REMOVE_REQ ISI-message. |
|
828 |
// ---------------------------------------------------------------------------- |
|
829 |
// |
|
830 |
TInt CMmPipeControl::PnsPipeRemoveReq( |
|
831 |
const TUint8 aTransId, |
|
832 |
const TUint8 aPipeHandle ) |
|
833 |
{ |
|
834 |
TFLOGSTRING2("TSY: CMmPipeControl::PnsPipeRemoveReq. PipeHandle: %d", aPipeHandle ); |
|
835 |
OstTraceExt1( TRACE_NORMAL, CMMPIPECONTROL_PNSPIPEREMOVEREQ, "CMmPipeControl::PnsPipeRemoveReq;aPipeHandle=%hhu", aPipeHandle ); |
|
836 |
||
837 |
// Set ret to KErrNone |
|
838 |
TInt ret( KErrNone ); |
|
839 |
||
840 |
// Check if Pipe operation is not outstanding. IsOperationCalled is EFalse |
|
841 |
if ( !IsOperationCalled( aPipeHandle ) ) |
|
842 |
{ |
|
843 |
// Create buffer for isi msg data |
|
844 |
#ifdef INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING |
|
845 |
TBuf8<SIZE_PNS_PIPE_REMOVE_REQ> data; |
|
846 |
#else /* INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING */ |
|
847 |
TBuf8<SIZE_CM_PIPE_REMOVE_REQ> data; |
|
848 |
#endif /* INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING */ |
|
849 |
data.Append( aPipeHandle ); |
|
850 |
data.Append( KGpdsPadding ); |
|
851 |
||
852 |
// Send Isi message via phonet |
|
853 |
ret = iPhoNetSender->Send( |
|
854 |
PN_PIPE, |
|
855 |
aTransId, |
|
856 |
PNS_PIPE_REMOVE_REQ, |
|
857 |
data ); |
|
858 |
||
859 |
if ( KErrNone == ret ) |
|
860 |
{ |
|
861 |
SetPipeHandle( aPipeHandle ); |
|
862 |
} |
|
863 |
//no else |
|
864 |
} |
|
865 |
else |
|
866 |
{ |
|
867 |
// Remove req is buffered by transaction id |
|
868 |
SetTransactionId( aPipeHandle, aTransId ); |
|
869 |
} |
|
870 |
||
871 |
return ret; |
|
872 |
} |
|
873 |
||
874 |
// ---------------------------------------------------------------------------- |
|
875 |
// CMmPipeControl::PnsPipeRemoveResp |
|
876 |
// Breaks a PNS_PIPE_REMOVE_RESP ISI-message. |
|
877 |
// ---------------------------------------------------------------------------- |
|
878 |
// |
|
879 |
void CMmPipeControl::PnsPipeRemoveResp( |
|
880 |
const TIsiReceiveC& aIsiMessage ) |
|
881 |
{ |
|
882 |
TFLOGSTRING("TSY: CMmPipeControl::PnsPipeRemoveResp"); |
|
883 |
OstTrace0( TRACE_NORMAL, DUP1_CMMPIPECONTROL_PNSPIPEREMOVERESP, "CMmPipeControl::PnsPipeRemoveResp" ); |
|
884 |
// Get Transaction Id from the ISI message |
|
885 |
TUint8 transId( aIsiMessage.Get8bit( ISI_HEADER_OFFSET_TRANSID ) ); |
|
886 |
||
887 |
// pipe control handles only messages for NIF pipes |
|
888 |
TInt ret = iContextList->PipeCreateTransIdOkByTransId( transId ); |
|
889 |
||
890 |
if ( KErrNone == ret ) |
|
891 |
{ |
|
892 |
// Get Pipehandle from the ISI message |
|
893 |
#ifdef INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING |
|
894 |
TUint8 pipeHandle( aIsiMessage.Get8bit( |
|
895 |
ISI_HEADER_SIZE + PNS_PIPE_REMOVE_RESP_OFFSET_PIPEHANDLE ) ); |
|
896 |
// Get Errorcode from the ISI message |
|
897 |
TUint8 errorCode( aIsiMessage.Get8bit( |
|
898 |
ISI_HEADER_SIZE + PNS_PIPE_REMOVE_RESP_OFFSET_ERRORCODE ) ); |
|
899 |
#else /* INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING */ |
|
900 |
TUint8 pipeHandle( aIsiMessage.Get8bit( |
|
901 |
ISI_HEADER_SIZE + CM_PIPE_REMOVE_RESP_OFFSET_PIPEHANDLE ) ); |
|
902 |
// Get Errorcode from the ISI message |
|
903 |
TUint8 errorCode( aIsiMessage.Get8bit( |
|
904 |
ISI_HEADER_SIZE + CM_PIPE_REMOVE_RESP_OFFSET_ERRORCODE ) ); |
|
905 |
#endif /* INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING */ |
|
906 |
||
907 |
TFLOGSTRING4("TSY: CMmPipeControl::PnsPipeRemoveResp - traId: %d, PipeHandle: %d, ErrorCode: %d", transId, pipeHandle, errorCode ); |
|
908 |
OstTraceExt3( TRACE_NORMAL, CMMPIPECONTROL_PNSPIPEREMOVERESP, "CMmPipeControl::PnsPipeRemoveResp;transId=%hhu;pipeHandle=%hhu;errorCode=%hhu", transId, pipeHandle, errorCode ); |
|
909 |
||
910 |
// Call ResetPipeHandle -method from CMmPipeControl |
|
911 |
ResetPipeHandle( pipeHandle ); |
|
912 |
||
913 |
iContextMessHandler->CompletePipeOperation( |
|
914 |
PNS_PIPE_REMOVE_RESP, |
|
915 |
transId, |
|
916 |
pipeHandle, |
|
917 |
errorCode ); |
|
918 |
} |
|
919 |
// no else |
|
920 |
} |
|
921 |
||
922 |
#ifdef DUMMY_NIF_PEP_FOR_PACKET_DATA_TESTING_DOS |
|
923 |
// ---------------------------------------------------------------------------- |
|
924 |
// CMmPipeControl::PnsPepConnectReq |
|
925 |
// Breaks a PNS_PEP_CONNECT_REQ ISI-message. |
|
926 |
// ---------------------------------------------------------------------------- |
|
927 |
// |
|
928 |
void CMmPipeControl::PnsPepConnectReq( |
|
929 |
const TIsiReceiveC& aIsiMessage ) |
|
930 |
{ |
|
931 |
||
932 |
TFLOGSTRING("TSY: CMmPipeControl::PnsPepConnectReq"); |
|
933 |
OstTrace0( TRACE_NORMAL, CMMPIPECONTROL_PNSPEPCONNECTREQ, "CMmPipeControl::PnsPepConnectReq" ); |
|
934 |
||
935 |
// Get Transaction Id from the ISI message |
|
936 |
TUint8 transId( aIsiMessage.Get8bit( ISI_HEADER_OFFSET_TRANSID ) ); |
|
937 |
// Get Pipehandle from the ISI message |
|
938 |
#ifdef INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING |
|
939 |
TUint8 pipeHandle( aIsiMessage.Get8bit( |
|
940 |
ISI_HEADER_SIZE + PNS_PEP_CONNECT_REQ_OFFSET_PIPEHANDLE ) ); |
|
941 |
#else /* INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING */ |
|
942 |
TUint8 pipeHandle( aIsiMessage.Get8bit( |
|
943 |
ISI_HEADER_SIZE + CM_PEP_CONNECT_REQ_OFFSET_PIPEHANDLE ) ); |
|
944 |
#endif /* INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING */ |
|
945 |
||
946 |
TFLOGSTRING3("TSY: CMmPipeControl::PnsPepConnectReq - traId: %d, PipeHandle: %d", transId, pipeHandle ); |
|
947 |
OstTraceExt2( TRACE_NORMAL, DUP1_CMMPIPECONTROL_PNSPEPCONNECTREQ, "CMmPipeControl::PnsPepConnectReq;transId=%hhu;pipeHandle=%hhu", transId, pipeHandle ); |
|
948 |
||
949 |
PnsPepConnectResp( transId, pipeHandle ); |
|
950 |
} |
|
951 |
||
952 |
// ---------------------------------------------------------------------------- |
|
953 |
// CMmPipeControl::PnsPepConnectResp |
|
954 |
// Construct a PNS_PEP_CONNECT_RESP ISI-message. |
|
955 |
// ---------------------------------------------------------------------------- |
|
956 |
// |
|
957 |
void CMmPipeControl::PnsPepConnectResp( |
|
958 |
const TUint8 aTransId, |
|
959 |
const TUint8 aPipeHandle ) |
|
960 |
{ |
|
961 |
||
962 |
TFLOGSTRING3("TSY: CMmPipeControl::PnsPepConnectResp - traId: %d, pipe handle: %d", aTransId, aPipeHandle); |
|
963 |
OstTraceExt2( TRACE_NORMAL, DUP1_CMMPIPECONTROL_PNSPEPCONNECTRESP, "CMmPipeControl::PnsPepConnectResp;aTransId=%hhu;aPipeHandle=%hhu", aTransId, aPipeHandle ); |
|
964 |
||
965 |
// Create buffer for isi msg data |
|
966 |
#ifdef INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING |
|
967 |
TBuf8<SIZE_PNS_PEP_CONNECT_RESP> data; |
|
968 |
#else /* INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING */ |
|
969 |
TBuf8<SIZE_CM_PEP_CONNECT_RESP> data; |
|
970 |
#endif /* INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING */ |
|
971 |
// Set message data |
|
972 |
data.Append( aPipeHandle ); |
|
973 |
data.Append( PN_PIPE_NO_ERROR ); |
|
974 |
||
975 |
// Send Isi message via phonet |
|
976 |
TInt ret( iPhoNetSender->Send( |
|
977 |
PN_PIPE, |
|
978 |
aTransId, |
|
979 |
PNS_PEP_CONNECT_RESP, |
|
980 |
data ) ); |
|
981 |
||
982 |
TFLOGSTRING3("TSY: CMmPipeControl::PnsPepConnectResp. PipeHandle: %d RetFromPhonetSender: %d", aPipeHandle, ret ); |
|
983 |
||
984 |
OstTraceExt2( TRACE_NORMAL, DUP2_CMMPIPECONTROL_PNSPEPCONNECTRESP, "CMmPipeControl::PnsPepConnectResp;aPipeHandle=%hhu;RetFromPhonetSender=%d", aPipeHandle, ret ); |
|
985 |
} |
|
986 |
||
987 |
// ---------------------------------------------------------------------------- |
|
988 |
// CMmPipeControl::PnsPepDisconnectReq |
|
989 |
// Breaks a PNS_PEP_DISCONNECT_REQ ISI-message. |
|
990 |
// ---------------------------------------------------------------------------- |
|
991 |
// |
|
992 |
void CMmPipeControl::PnsPepDisconnectReq( |
|
993 |
const TIsiReceiveC& aIsiMessage ) |
|
994 |
{ |
|
995 |
// Get Transaction Id from the ISI message |
|
996 |
TUint8 transId( aIsiMessage.Get8bit( ISI_HEADER_OFFSET_TRANSID ) ); |
|
997 |
// Get Pipehandle from the ISI message |
|
998 |
#ifdef INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING |
|
999 |
TUint8 pipeHandle( aIsiMessage.Get8bit( |
|
1000 |
ISI_HEADER_SIZE + PNS_PEP_DISCONNECT_REQ_OFFSET_PIPEHANDLE ) ); |
|
1001 |
#else /* INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING */ |
|
1002 |
TUint8 pipeHandle( aIsiMessage.Get8bit( |
|
1003 |
ISI_HEADER_SIZE + CM_PEP_DISCONNECT_REQ_OFFSET_PIPEHANDLE ) ); |
|
1004 |
#endif /* INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING */ |
|
1005 |
||
1006 |
TFLOGSTRING3("TSY: CMmPipeControl::PnsPepDisconnectReq - traId: %d, PipeHandle: %d", transId, pipeHandle ); |
|
1007 |
OstTraceExt2( TRACE_NORMAL, CMMPIPECONTROL_PNSPEPDISCONNECTREQ, "CMmPipeControl::PnsPepDisconnectReq;transId=%hhu;pipeHandle=%hhu", transId, pipeHandle ); |
|
1008 |
||
1009 |
PnsPepDisconnectResp( transId, pipeHandle ); |
|
1010 |
} |
|
1011 |
||
1012 |
// ---------------------------------------------------------------------------- |
|
1013 |
// CMmPipeControl::PnsPepDisconnectResp |
|
1014 |
// Construct a PNS_PEP_DISCONNECT_RESP ISI-message. |
|
1015 |
// ---------------------------------------------------------------------------- |
|
1016 |
// |
|
1017 |
void CMmPipeControl::PnsPepDisconnectResp( |
|
1018 |
const TUint8 aTransId, |
|
1019 |
const TUint8 aPipeHandle ) |
|
1020 |
{ |
|
1021 |
||
1022 |
TFLOGSTRING3("TSY: CMmPipeControl::PnsPepDisconnectResp - traId: %d, pipe handle: %d", aTransId, aPipeHandle); |
|
1023 |
OstTraceExt2( TRACE_NORMAL, CMMPIPECONTROL_PNSPEPDISCONNECTRESP, "CMmPipeControl::PnsPepDisconnectResp;aTransId=%hhu;aPipeHandle=%hhu", aTransId, aPipeHandle ); |
|
1024 |
||
1025 |
//Create buffer for isi msg data |
|
1026 |
#ifdef INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING |
|
1027 |
TBuf8<SIZE_PNS_PEP_DISCONNECT_RESP> data; |
|
1028 |
#else /* INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING */ |
|
1029 |
TBuf8<SIZE_CM_PEP_DISCONNECT_RESP> data; |
|
1030 |
#endif /* INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING */ |
|
1031 |
// Set message data |
|
1032 |
data.Append( aPipeHandle ); |
|
1033 |
data.Append( PN_PIPE_NO_ERROR ); |
|
1034 |
||
1035 |
// Send Isi message via phonet |
|
1036 |
TInt ret( iPhoNetSender->Send( |
|
1037 |
PN_PIPE, aTransId, PNS_PEP_DISCONNECT_RESP, data ) ); |
|
1038 |
||
1039 |
TFLOGSTRING3("TSY: CMmPipeControl::PnsPepDisconnectResp. PipeHandle: %d RetFromPhonetSender: %d", aPipeHandle, ret ); |
|
1040 |
OstTraceExt2( TRACE_NORMAL, DUP1_CMMPIPECONTROL_PNSPEPDISCONNECTRESP, "CMmPipeControl::PnsPepDisconnectResp;aPipeHandle=%hhu;RetFromPhonetSender=%d", aPipeHandle, ret ); |
|
1041 |
} |
|
1042 |
||
1043 |
// ---------------------------------------------------------------------------- |
|
1044 |
// CMmPipeControl::PnsPepResetReq |
|
1045 |
// Breaks a CM_PEP_RESET_REQ ISI-message. |
|
1046 |
// ---------------------------------------------------------------------------- |
|
1047 |
// |
|
1048 |
void CMmPipeControl::PnsPepResetReq( |
|
1049 |
const TIsiReceiveC& aIsiMessage ) |
|
1050 |
{ |
|
1051 |
// Get Transaction Id from the ISI message |
|
1052 |
TUint8 transId( aIsiMessage.Get8bit( ISI_HEADER_OFFSET_TRANSID ) ); |
|
1053 |
// Get Pipehandle from the ISI message |
|
1054 |
#ifdef INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING |
|
1055 |
TUint8 pipeHandle( aIsiMessage.Get8bit( |
|
1056 |
ISI_HEADER_SIZE + PNS_PEP_RESET_REQ_OFFSET_PIPEHANDLE ) ); |
|
1057 |
#else /* INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING */ |
|
1058 |
TUint8 pipeHandle( aIsiMessage.Get8bit( |
|
1059 |
ISI_HEADER_SIZE + CM_PEP_RESET_REQ_OFFSET_PIPEHANDLE ) ); |
|
1060 |
#endif /* INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING */ |
|
1061 |
||
1062 |
TFLOGSTRING3("TSY: CMmPipeControl::PnsPepResetReq - traId: %d, PipeHandle: %d", transId, pipeHandle ); |
|
1063 |
OstTraceExt2( TRACE_NORMAL, CMMPIPECONTROL_PNSPEPRESETREQ, "CMmPipeControl::PnsPepResetReq;transId=%hhu;pipeHandle=%hhu", transId, pipeHandle ); |
|
1064 |
||
1065 |
PnsPepResetResp( transId, pipeHandle ); |
|
1066 |
} |
|
1067 |
||
1068 |
// ---------------------------------------------------------------------------- |
|
1069 |
// CMmPipeControl::PnsPepResetResp |
|
1070 |
// Construct a PNS_PEP_RESET_RESP ISI-message. |
|
1071 |
// ---------------------------------------------------------------------------- |
|
1072 |
// |
|
1073 |
void CMmPipeControl::PnsPepResetResp( |
|
1074 |
const TUint8 aTransId, |
|
1075 |
const TUint8 aPipeHandle ) |
|
1076 |
{ |
|
1077 |
||
1078 |
TFLOGSTRING3("TSY: CMmPipeControl::PnsPepResetResp - traId: %d, pipe handle: %d", aTransId, aPipeHandle); |
|
1079 |
OstTraceExt1( TRACE_NORMAL, CMMPIPECONTROL_PNSPEPRESETRESP, "CMmPipeControl::PnsPepResetResp;aTransId=%hhu", aTransId ); |
|
1080 |
||
1081 |
// Create buffer for isi msg data |
|
1082 |
#ifdef INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING |
|
1083 |
TBuf8<SIZE_PNS_PEP_RESET_RESP> data; |
|
1084 |
#else /* INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING */ |
|
1085 |
TBuf8<SIZE_CM_PEP_RESET_RESP> data; |
|
1086 |
#endif /* INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING */ |
|
1087 |
// Set message data |
|
1088 |
data.Append( aPipeHandle ); |
|
1089 |
data.Append( PN_PIPE_NO_ERROR ); |
|
1090 |
||
1091 |
// Send Isi message via phonet |
|
1092 |
TInt ret( iPhoNetSender->Send( |
|
1093 |
PN_PIPE, aTransId, PNS_PEP_RESET_RESP, data ) ); |
|
1094 |
||
1095 |
TFLOGSTRING3("TSY: CMmPipeControl::PnsPepResetResp. PipeHandle: %d RetFromPhonetSender: %d", aPipeHandle, ret ); |
|
1096 |
OstTraceExt2( TRACE_NORMAL, DUP1_CMMPIPECONTROL_PNSPEPRESETRESP, "CMmPipeControl::PnsPepResetResp;aPipeHandle=%hhu;ret=%d", aPipeHandle, ret ); |
|
1097 |
} |
|
1098 |
||
1099 |
// ---------------------------------------------------------------------------- |
|
1100 |
// CMmPipeControl::PnsPepEnableReq |
|
1101 |
// Breaks a PNS_PEP_ENABLE_REQ ISI-message. |
|
1102 |
// ---------------------------------------------------------------------------- |
|
1103 |
// |
|
1104 |
void CMmPipeControl::PnsPepEnableReq( |
|
1105 |
const TIsiReceiveC& aIsiMessage ) |
|
1106 |
{ |
|
1107 |
||
1108 |
// Get Transaction Id from the ISI message |
|
1109 |
TUint8 transId( aIsiMessage.Get8bit( ISI_HEADER_OFFSET_TRANSID ) ); |
|
1110 |
// Get Pipehandle from the ISI message |
|
1111 |
TUint8 pipeHandle( aIsiMessage.Get8bit( |
|
1112 |
#ifdef INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING |
|
1113 |
ISI_HEADER_SIZE + PNS_PEP_ENABLE_REQ_OFFSET_PIPEHANDLE ) ); |
|
1114 |
#else /* INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING */ |
|
1115 |
ISI_HEADER_SIZE + CM_PEP_ENABLE_REQ_OFFSET_PIPEHANDLE ) ); |
|
1116 |
#endif /* INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING */ |
|
1117 |
||
1118 |
TFLOGSTRING3("TSY: CMmPipeControl::PnsPepEnableReq - traId: %d, PipeHandle: %d", transId, pipeHandle ); |
|
1119 |
OstTraceExt2( TRACE_NORMAL, CMMPIPECONTROL_PNSPEPENABLEREQ, "CMmPipeControl::PnsPepEnableReq;transId=%hhu;pipeHandle=%hhu", transId, pipeHandle ); |
|
1120 |
||
1121 |
PnsPepEnableResp( transId, pipeHandle ); |
|
1122 |
} |
|
1123 |
||
1124 |
// ---------------------------------------------------------------------------- |
|
1125 |
// CMmPipeControl::PnsPepEnableResp |
|
1126 |
// Construct a PNS_PEP_ENABLE_RESP ISI-message. |
|
1127 |
// ---------------------------------------------------------------------------- |
|
1128 |
// |
|
1129 |
void CMmPipeControl::PnsPepEnableResp( |
|
1130 |
const TUint8 aTransId, |
|
1131 |
const TUint8 aPipeHandle ) |
|
1132 |
{ |
|
1133 |
||
1134 |
TFLOGSTRING3("TSY: CMmPipeControl::PnsPepEnableResp - traId: %d, pipe handle: %d", aTransId, aPipeHandle); |
|
1135 |
OstTraceExt2( TRACE_NORMAL, CMMPIPECONTROL_PNSPEPENABLERESP, "CMmPipeControl::PnsPepEnableResp;aTransId=%hhu;aPipeHandle=%hhu", aTransId, aPipeHandle ); |
|
1136 |
||
1137 |
// Create buffer for isi msg data |
|
1138 |
#ifdef INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING |
|
1139 |
TBuf8<SIZE_PNS_PEP_ENABLE_RESP> data; |
|
1140 |
#else /* INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING */ |
|
1141 |
TBuf8<SIZE_CM_PEP_ENABLE_RESP> data; |
|
1142 |
#endif /* INTERNAL_TESTING_OLD_IMPLEMENTATION_FOR_UICC_TESTING */ |
|
1143 |
// Set message data |
|
1144 |
data.Append( aPipeHandle ); |
|
1145 |
data.Append( PN_PIPE_NO_ERROR ); |
|
1146 |
||
1147 |
// Send Isi message via phonet |
|
1148 |
TInt ret( iPhoNetSender->Send( |
|
1149 |
PN_PIPE, |
|
1150 |
aTransId, |
|
1151 |
PNS_PEP_ENABLE_RESP, |
|
1152 |
data ) ); |
|
1153 |
||
1154 |
TFLOGSTRING3("TSY: CMmPipeControl::PnsPepEnableResp. PipeHandle: %d RetFromPhonetSender: %d", aPipeHandle, ret ); |
|
1155 |
OstTraceExt2( TRACE_NORMAL, DUP1_CMMPIPECONTROL_PNSPEPENABLERESP, "CMmPipeControl::PnsPepEnableResp;aPipeHandle=%hhu;RetFromPhonetSender=%d", aPipeHandle, ret ); |
|
1156 |
} |
|
1157 |
||
1158 |
#endif // DUMMY_NIF_PEP_FOR_PACKET_DATA_TESTING_DOS |
|
1159 |
||
1160 |
// ================= OTHER EXPORTED FUNCTIONS =============================== |
|
1161 |
||
1162 |
//None |
|
1163 |
||
1164 |
// End of File |