1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
3 // This component and the accompanying materials are made available |
4 // under the terms of "Eclipse Public License v1.0" |
4 // under the terms of "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
18 // |
18 // |
19 |
19 |
20 |
20 |
21 |
21 |
22 //INCLUDES |
22 //INCLUDES |
|
23 |
|
24 #include "OstTraceDefinitions.h" |
|
25 #ifdef OST_TRACE_COMPILER_IN_USE |
|
26 #include "CSatNotifyLaunchBrowserTraces.h" |
|
27 #endif |
|
28 |
23 #include <satcs.h> // Etel SAT IPC definitions |
29 #include <satcs.h> // Etel SAT IPC definitions |
24 #include "CSatTsy.h" // Tsy class header |
30 #include "CSatTsy.h" // Tsy class header |
25 #include "CSatNotifyLaunchBrowser.h"// Tsy class header |
31 #include "CSatNotifyLaunchBrowser.h"// Tsy class header |
26 #include "CSatNotificationsTsy.h" // Class header |
32 #include "CSatNotificationsTsy.h" // Class header |
27 #include "CBerTlv.h" // Ber Tlv data handling |
33 #include "CBerTlv.h" // Ber Tlv data handling |
28 #include "TTlv.h" // TTlv class |
34 #include "TTlv.h" // TTlv class |
29 #include "CSatDataPackage.h" // Parameter packing |
35 #include "CSatDataPackage.h" // Parameter packing |
30 #include "TfLogger.h" // For TFLOGSTRING |
|
31 #include "TSatUtility.h" // Utilities |
36 #include "TSatUtility.h" // Utilities |
32 #include "CSatTsyReqHandleStore.h" // Request handle class |
37 #include "CSatTsyReqHandleStore.h" // Request handle class |
33 #include "cmmmessagemanagerbase.h" // Message manager class for forwarding req. |
38 #include "cmmmessagemanagerbase.h" // Message manager class for forwarding req. |
34 |
39 |
35 // ----------------------------------------------------------------------------- |
40 // ----------------------------------------------------------------------------- |
40 CSatNotifyLaunchBrowser* CSatNotifyLaunchBrowser::NewL |
45 CSatNotifyLaunchBrowser* CSatNotifyLaunchBrowser::NewL |
41 ( |
46 ( |
42 CSatNotificationsTsy* aNotificationsTsy |
47 CSatNotificationsTsy* aNotificationsTsy |
43 ) |
48 ) |
44 { |
49 { |
45 TFLOGSTRING("CSAT: CSatNotifyLaunchBrowser::NewL"); |
50 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYLAUNCHBROWSER_NEWL_1, "CSAT: CSatNotifyLaunchBrowser::NewL"); |
46 CSatNotifyLaunchBrowser* const satNotifyLaunchBrowser = |
51 CSatNotifyLaunchBrowser* const satNotifyLaunchBrowser = |
47 new ( ELeave ) CSatNotifyLaunchBrowser( aNotificationsTsy ); |
52 new ( ELeave ) CSatNotifyLaunchBrowser( aNotificationsTsy ); |
48 CleanupStack::PushL( satNotifyLaunchBrowser ); |
53 CleanupStack::PushL( satNotifyLaunchBrowser ); |
49 satNotifyLaunchBrowser->ConstructL(); |
54 satNotifyLaunchBrowser->ConstructL(); |
50 CleanupStack::Pop( satNotifyLaunchBrowser ); |
55 CleanupStack::Pop( satNotifyLaunchBrowser ); |
51 TFLOGSTRING("CSAT: CSatNotifyLaunchBrowser::NewL, end of method"); |
56 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYLAUNCHBROWSER_NEWL_2, "CSAT: CSatNotifyLaunchBrowser::NewL, end of method"); |
52 return satNotifyLaunchBrowser; |
57 return satNotifyLaunchBrowser; |
53 } |
58 } |
54 |
59 |
55 // ----------------------------------------------------------------------------- |
60 // ----------------------------------------------------------------------------- |
56 // CSatNotifyLaunchBrowser::~CSatNotifyLaunchBrowser |
61 // CSatNotifyLaunchBrowser::~CSatNotifyLaunchBrowser |
60 CSatNotifyLaunchBrowser::~CSatNotifyLaunchBrowser |
65 CSatNotifyLaunchBrowser::~CSatNotifyLaunchBrowser |
61 ( |
66 ( |
62 // None |
67 // None |
63 ) |
68 ) |
64 { |
69 { |
65 TFLOGSTRING("CSAT: CSatNotifyLaunchBrowser::~CSatNotifyLaunchBrowser"); |
70 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYLAUNCHBROWSER_DTOR_1, "CSAT: CSatNotifyLaunchBrowser::~CSatNotifyLaunchBrowser"); |
66 } |
71 } |
67 |
72 |
68 // ----------------------------------------------------------------------------- |
73 // ----------------------------------------------------------------------------- |
69 // CSatNotifyLaunchBrowser::CSatNotifyLaunchBrowser |
74 // CSatNotifyLaunchBrowser::CSatNotifyLaunchBrowser |
70 // Default C++ constructor |
75 // Default C++ constructor |
86 void CSatNotifyLaunchBrowser::ConstructL |
91 void CSatNotifyLaunchBrowser::ConstructL |
87 ( |
92 ( |
88 // None |
93 // None |
89 ) |
94 ) |
90 { |
95 { |
91 TFLOGSTRING("CSAT: CSatNotifyLaunchBrowser::ConstructL"); |
96 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYLAUNCHBROWSER_CONSTRUCTL_1, "CSAT: CSatNotifyLaunchBrowser::ConstructL"); |
92 iSsStatus = CSatNotificationsTsy::ENotBusy; |
97 iSsStatus = CSatNotificationsTsy::ENotBusy; |
93 } |
98 } |
94 |
99 |
95 // ----------------------------------------------------------------------------- |
100 // ----------------------------------------------------------------------------- |
96 // CSatNotifyLaunchBrowser::Notify |
101 // CSatNotifyLaunchBrowser::Notify |
102 ( |
107 ( |
103 const TTsyReqHandle aTsyReqHandle, |
108 const TTsyReqHandle aTsyReqHandle, |
104 const TDataPackage& aPackage |
109 const TDataPackage& aPackage |
105 ) |
110 ) |
106 { |
111 { |
107 TFLOGSTRING("CSAT: CSatNotifyLaunchBrowser::Notify"); |
112 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYLAUNCHBROWSER_NOTIFY_1, "CSAT: CSatNotifyLaunchBrowser::Notify"); |
108 // Save data pointer to client side for completion |
113 // Save data pointer to client side for completion |
109 iLaunchBrowserV2Pckg = reinterpret_cast<RSat::TLaunchBrowserV2Pckg*>( |
114 iLaunchBrowserV2Pckg = reinterpret_cast<RSat::TLaunchBrowserV2Pckg*>( |
110 aPackage.Des1n() ); |
115 aPackage.Des1n() ); |
111 // Save the request handle |
116 // Save the request handle |
112 iNotificationsTsy->iSatTsy->SaveReqHandle( aTsyReqHandle, |
117 iNotificationsTsy->iSatTsy->SaveReqHandle( aTsyReqHandle, |
126 TInt CSatNotifyLaunchBrowser::CancelNotification |
131 TInt CSatNotifyLaunchBrowser::CancelNotification |
127 ( |
132 ( |
128 const TTsyReqHandle aTsyReqHandle |
133 const TTsyReqHandle aTsyReqHandle |
129 ) |
134 ) |
130 { |
135 { |
131 TFLOGSTRING("CSAT: CSatNotifyLaunchBrowser::CancelNotification"); |
136 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYLAUNCHBROWSER_CANCELNOTIFICATION_1, "CSAT: CSatNotifyLaunchBrowser::CancelNotification"); |
132 |
137 |
133 // Reset the request handle |
138 // Reset the request handle |
134 TTsyReqHandle reqHandle = iNotificationsTsy->iSatReqHandleStore-> |
139 TTsyReqHandle reqHandle = iNotificationsTsy->iSatReqHandleStore-> |
135 ResetTsyReqHandle( CSatTsy::ESatNotifyLaunchBrowserPCmdReqType ); |
140 ResetTsyReqHandle( CSatTsy::ESatNotifyLaunchBrowserPCmdReqType ); |
136 // Reset the data pointer |
141 // Reset the data pointer |
153 ( |
158 ( |
154 CSatDataPackage* aDataPackage, |
159 CSatDataPackage* aDataPackage, |
155 TInt aErrorCode |
160 TInt aErrorCode |
156 ) |
161 ) |
157 { |
162 { |
158 TFLOGSTRING("CSAT: CSatNotifyLaunchBrowser::CompleteNotifyL"); |
163 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYLAUNCHBROWSER_COMPLETENOTIFYL_1, "CSAT: CSatNotifyLaunchBrowser::CompleteNotifyL"); |
159 TInt ret( KErrNone ); |
164 TInt ret( KErrNone ); |
160 TInt returnValue( KErrNone ); |
165 TInt returnValue( KErrNone ); |
161 // Unpack parameters |
166 // Unpack parameters |
162 TPtrC8* data; |
167 TPtrC8* data; |
163 aDataPackage->UnPackData( &data ); |
168 aDataPackage->UnPackData( &data ); |
181 if ( CSatTsy::ESatReqHandleUnknown != reqHandle ) |
186 if ( CSatTsy::ESatReqHandleUnknown != reqHandle ) |
182 { |
187 { |
183 // Check if busy |
188 // Check if busy |
184 if ( CSatNotificationsTsy::ENotBusy != iSsStatus ) |
189 if ( CSatNotificationsTsy::ENotBusy != iSsStatus ) |
185 { |
190 { |
186 TFLOGSTRING("CSAT: CSatNotifyLaunchBrowser::CompleteNotifyL, \ |
191 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYLAUNCHBROWSER_COMPLETENOTIFYL_2, "CSAT: CSatNotifyLaunchBrowser::CompleteNotifyL, iSsStatus is busy"); |
187 iSsStatus is busy"); |
|
188 |
192 |
189 if( CSatNotificationsTsy::EUssdBusy == iSsStatus) |
193 if( CSatNotificationsTsy::EUssdBusy == iSsStatus) |
190 { |
194 { |
191 // Ussd transaction ongoing |
195 // Ussd transaction ongoing |
192 CreateTerminalRespL( pCmdNumber, RSat::KMeUnableToProcessCmd, |
196 CreateTerminalRespL( pCmdNumber, RSat::KMeUnableToProcessCmd, |
199 RSat::KMeBusyOnSs ); |
203 RSat::KMeBusyOnSs ); |
200 } |
204 } |
201 } |
205 } |
202 else |
206 else |
203 { |
207 { |
204 TFLOGSTRING("CSAT: CSatNotifyLaunchBrowser::CompleteNotifyL \ |
208 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYLAUNCHBROWSER_COMPLETENOTIFYL_3, "CSAT: CSatNotifyLaunchBrowser::CompleteNotifyL No SS Transaction ongoing"); |
205 No SS Transaction ongoing"); |
|
206 // Complete right away if error has occured, otherwise continue.. |
209 // Complete right away if error has occured, otherwise continue.. |
207 if ( KErrNone == aErrorCode ) |
210 if ( KErrNone == aErrorCode ) |
208 { |
211 { |
209 // Launch browser structure |
212 // Launch browser structure |
210 RSat::TLaunchBrowserV2& launchBrowserV2 = |
213 RSat::TLaunchBrowserV2& launchBrowserV2 = |
234 break; |
237 break; |
235 } |
238 } |
236 case KLaunchBrowserCmdQualifierNotUsed: |
239 case KLaunchBrowserCmdQualifierNotUsed: |
237 case KLaunchBrowserCmdQualifierReserved: |
240 case KLaunchBrowserCmdQualifierReserved: |
238 { |
241 { |
239 TFLOGSTRING("CSAT: CSatNotifyLaunchBrowser::\ |
242 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYLAUNCHBROWSER_COMPLETENOTIFYL_4, "CSAT: CSatNotifyLaunchBrowser::CompleteNotifyL, Command Type not understood"); |
240 CompleteNotifyL, Command Type not understood"); |
|
241 CreateTerminalRespL( pCmdNumber, |
243 CreateTerminalRespL( pCmdNumber, |
242 RSat::KCmdTypeNotUnderstood, KNoCause ); |
244 RSat::KCmdTypeNotUnderstood, KNoCause ); |
243 ret = KErrCorrupt; |
245 ret = KErrCorrupt; |
244 break; |
246 break; |
245 } |
247 } |
296 launchBrowserV2.iAlphaId.iStatus = |
298 launchBrowserV2.iAlphaId.iStatus = |
297 RSat::EAlphaIdNotPresent; |
299 RSat::EAlphaIdNotPresent; |
298 |
300 |
299 if ( KErrNotFound != returnValue ) |
301 if ( KErrNotFound != returnValue ) |
300 { |
302 { |
301 TFLOGSTRING("CSAT: CSatNotifyLaunchBrowser::\ |
303 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYLAUNCHBROWSER_COMPLETENOTIFYL_5, "CSAT: CSatNotifyLaunchBrowser::CompleteNotifyL, Alpha ID present"); |
302 CompleteNotifyL, Alpha ID present"); |
|
303 TUint8 alphaIdLength( alphaIdentifier.GetLength() ); |
304 TUint8 alphaIdLength( alphaIdentifier.GetLength() ); |
304 if ( alphaIdLength ) |
305 if ( alphaIdLength ) |
305 { |
306 { |
306 TPtrC8 sourceString; |
307 TPtrC8 sourceString; |
307 |
308 |
316 launchBrowserV2.iAlphaId.iStatus = |
317 launchBrowserV2.iAlphaId.iStatus = |
317 RSat::EAlphaIdProvided; |
318 RSat::EAlphaIdProvided; |
318 } |
319 } |
319 else |
320 else |
320 { |
321 { |
321 TFLOGSTRING("CSAT: CSatNotifyLaunchBrowser::\ |
322 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYLAUNCHBROWSER_COMPLETENOTIFYL_6, "CSAT: CSatNotifyLaunchBrowser::CompleteNotifyL, Alpha ID is NULL"); |
322 CompleteNotifyL, Alpha ID is NULL"); |
|
323 launchBrowserV2.iAlphaId.iStatus = |
323 launchBrowserV2.iAlphaId.iStatus = |
324 RSat::EAlphaIdNull; |
324 RSat::EAlphaIdNull; |
325 } |
325 } |
326 } |
326 } |
327 |
327 |
339 iNotificationsTsy->iSatTsy->ReqCompleted( reqHandle, ret ); |
339 iNotificationsTsy->iSatTsy->ReqCompleted( reqHandle, ret ); |
340 } |
340 } |
341 }// End of if ( reqHandle != CSatTsy::ESatReqHandleUnknown ) |
341 }// End of if ( reqHandle != CSatTsy::ESatReqHandleUnknown ) |
342 else |
342 else |
343 { |
343 { |
344 TFLOGSTRING("CSAT: CSatNotifyLaunchBrowser::CompleteNotifyL, \ |
344 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYLAUNCHBROWSER_COMPLETENOTIFYL_7, "CSAT: CSatNotifyLaunchBrowser::CompleteNotifyL, Request not ongoing"); |
345 Request not ongoing"); |
|
346 // Request not on, returning response immediately |
345 // Request not on, returning response immediately |
347 CreateTerminalRespL( pCmdNumber, RSat::KMeUnableToProcessCmd, |
346 CreateTerminalRespL( pCmdNumber, RSat::KMeUnableToProcessCmd, |
348 KNoCause ); |
347 KNoCause ); |
349 } |
348 } |
350 |
349 |
361 TInt CSatNotifyLaunchBrowser::TerminalResponseL |
360 TInt CSatNotifyLaunchBrowser::TerminalResponseL |
362 ( |
361 ( |
363 TDes8* aRsp |
362 TDes8* aRsp |
364 ) |
363 ) |
365 { |
364 { |
366 TFLOGSTRING("CSAT: CSatNotifyLaunchBrowser::TerminalResponseL"); |
365 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYLAUNCHBROWSER_TERMINALRESPONSEL_1, "CSAT: CSatNotifyLaunchBrowser::TerminalResponseL"); |
367 TInt ret( KErrNone ); |
366 TInt ret( KErrNone ); |
368 TUint8 additionalInfo( KNoCause ); |
367 TUint8 additionalInfo( KNoCause ); |
369 RSat::TLaunchBrowserRspV2Pckg* aRspPckg = |
368 RSat::TLaunchBrowserRspV2Pckg* aRspPckg = |
370 reinterpret_cast<RSat::TLaunchBrowserRspV2Pckg*>( aRsp ); |
369 reinterpret_cast<RSat::TLaunchBrowserRspV2Pckg*>( aRsp ); |
371 RSat::TLaunchBrowserRspV2& rspV2 = ( *aRspPckg ) (); |
370 RSat::TLaunchBrowserRspV2& rspV2 = ( *aRspPckg ) (); |
386 ( RSat::KPartialComprehension != rspV2.iGeneralResult ) && |
385 ( RSat::KPartialComprehension != rspV2.iGeneralResult ) && |
387 ( RSat::KMissingInformation != rspV2.iGeneralResult ) && |
386 ( RSat::KMissingInformation != rspV2.iGeneralResult ) && |
388 ( RSat::KNetworkUnableToProcessCmd != rspV2.iGeneralResult ) && |
387 ( RSat::KNetworkUnableToProcessCmd != rspV2.iGeneralResult ) && |
389 ( RSat::KCmdNumberNotKnown != rspV2.iGeneralResult ) ) |
388 ( RSat::KCmdNumberNotKnown != rspV2.iGeneralResult ) ) |
390 { |
389 { |
391 TFLOGSTRING("CSAT: CSatNotifyLaunchBrowser::TerminalResponseL, \ |
390 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYLAUNCHBROWSER_TERMINALRESPONSEL_2, "CSAT: CSatNotifyLaunchBrowser::TerminalResponseL, Invalid General Result"); |
392 Invalid General Result"); |
|
393 // Invalid general result |
391 // Invalid general result |
394 ret = KErrCorrupt; |
392 ret = KErrCorrupt; |
395 } |
393 } |
396 |
394 |
397 // Check that infotype is valid: from enum TBrowserError in etelsat.h |
395 // Check that infotype is valid: from enum TBrowserError in etelsat.h |
400 ( RSat::KBearerUnvailable != rspV2.iInfoType ) && |
398 ( RSat::KBearerUnvailable != rspV2.iInfoType ) && |
401 ( RSat::KBrowserUnavailable != rspV2.iInfoType ) && |
399 ( RSat::KBrowserUnavailable != rspV2.iInfoType ) && |
402 ( RSat::KMeUnableToReadProvisioningData != rspV2.iInfoType ) && |
400 ( RSat::KMeUnableToReadProvisioningData != rspV2.iInfoType ) && |
403 ( RSat::KNoSpecificBrowserError != rspV2.iInfoType ) ) |
401 ( RSat::KNoSpecificBrowserError != rspV2.iInfoType ) ) |
404 { |
402 { |
405 TFLOGSTRING("CSAT: CSatNotifyLaunchBrowser::TerminalResponseL, \ |
403 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYLAUNCHBROWSER_TERMINALRESPONSEL_3, "CSAT: CSatNotifyLaunchBrowser::TerminalResponseL, Invalid Info Type"); |
406 Invalid Info Type"); |
|
407 ret = KErrCorrupt; |
404 ret = KErrCorrupt; |
408 } |
405 } |
409 |
406 |
410 // If there is Me (Mobile Equipment) error, additional info is needed |
407 // If there is Me (Mobile Equipment) error, additional info is needed |
411 if ( ( RSat::KMeProblem == rspV2.iInfoType ) ) |
408 if ( ( RSat::KMeProblem == rspV2.iInfoType ) ) |
415 { |
412 { |
416 additionalInfo = rspV2.iAdditionalInfo[0]; |
413 additionalInfo = rspV2.iAdditionalInfo[0]; |
417 } |
414 } |
418 else |
415 else |
419 { |
416 { |
420 TFLOGSTRING("CSAT: CSatNotifyLaunchBrowser::TerminalResponseL, \ |
417 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYLAUNCHBROWSER_TERMINALRESPONSEL_4, "CSAT: CSatNotifyLaunchBrowser::TerminalResponseL, Invalid Additional Info"); |
421 Invalid Additional Info"); |
|
422 // Invalid additional info field |
418 // Invalid additional info field |
423 ret = KErrCorrupt; |
419 ret = KErrCorrupt; |
424 } |
420 } |
425 } |
421 } |
426 |
422 |
440 CSatDataPackage* aDataPackage |
436 CSatDataPackage* aDataPackage |
441 ) |
437 ) |
442 { |
438 { |
443 // Unpack parameters |
439 // Unpack parameters |
444 aDataPackage->UnPackData( iSsStatus ); |
440 aDataPackage->UnPackData( iSsStatus ); |
445 TFLOGSTRING2("CSAT: CSatNotifyLaunchBrowser::SetSatTsySsStatus, status: %d", |
441 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYLAUNCHBROWSER_SETSSSTATUS_1, "CSAT: CSatNotifyLaunchBrowser::SetSatTsySsStatus, status: %d", iSsStatus ); |
446 iSsStatus ); |
|
447 } |
442 } |
448 |
443 |
449 // ----------------------------------------------------------------------------- |
444 // ----------------------------------------------------------------------------- |
450 // CSatNotifyLaunchBrowser::ParseBrowserIdL |
445 // CSatNotifyLaunchBrowser::ParseBrowserIdL |
451 // Help method for CompleteNotify, sets the Browser ID |
446 // Help method for CompleteNotify, sets the Browser ID |
456 TUint8 aPCmdNumber, |
451 TUint8 aPCmdNumber, |
457 CBerTlv& aBerTlv, |
452 CBerTlv& aBerTlv, |
458 RSat::TLaunchBrowserV2& aLaunchBrowserV2 |
453 RSat::TLaunchBrowserV2& aLaunchBrowserV2 |
459 ) |
454 ) |
460 { |
455 { |
461 TFLOGSTRING("CSAT: CSatNotifyLaunchBrowser::ParseBrowserId"); |
456 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYLAUNCHBROWSER_PARSEBROWSERIDL_1, "CSAT: CSatNotifyLaunchBrowser::ParseBrowserId"); |
462 TInt ret( KErrNone ); |
457 TInt ret( KErrNone ); |
463 CTlv browserId; // optional |
458 CTlv browserId; // optional |
464 TInt returnValue = aBerTlv.TlvByTagValue( &browserId, |
459 TInt returnValue = aBerTlv.TlvByTagValue( &browserId, |
465 KTlvBrowserIdentityTag ); |
460 KTlvBrowserIdentityTag ); |
466 |
461 |
479 browserId.GetShortInfo( ETLV_BrowserIdentity ); |
474 browserId.GetShortInfo( ETLV_BrowserIdentity ); |
480 } |
475 } |
481 } |
476 } |
482 else |
477 else |
483 { |
478 { |
484 TFLOGSTRING("CSAT: CSatNotifyLaunchBrowser::ParseBrowserId, \ |
479 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYLAUNCHBROWSER_PARSEBROWSERIDL_2, "CSAT: CSatNotifyLaunchBrowser::ParseBrowserId, Browser ID not set"); |
485 Browser ID not set"); |
|
486 aLaunchBrowserV2.iBrowserId = RSat::EBrowserIdNotSet; |
480 aLaunchBrowserV2.iBrowserId = RSat::EBrowserIdNotSet; |
487 } |
481 } |
488 return ret; |
482 return ret; |
489 } |
483 } |
490 |
484 |
498 TUint8 aPCmdNumber, |
492 TUint8 aPCmdNumber, |
499 CBerTlv& aBerTlv, |
493 CBerTlv& aBerTlv, |
500 RSat::TLaunchBrowserV2& aLaunchBrowserV2 |
494 RSat::TLaunchBrowserV2& aLaunchBrowserV2 |
501 ) |
495 ) |
502 { |
496 { |
503 TFLOGSTRING("CSAT: CSatNotifyLaunchBrowser::ParseUrl"); |
497 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYLAUNCHBROWSER_PARSEURLL_1, "CSAT: CSatNotifyLaunchBrowser::ParseUrl"); |
504 TInt ret( KErrNone ); |
498 TInt ret( KErrNone ); |
505 CTlv url; // mandatory |
499 CTlv url; // mandatory |
506 TInt returnValue = aBerTlv.TlvByTagValue( &url, KTlvUrlTag ); |
500 TInt returnValue = aBerTlv.TlvByTagValue( &url, KTlvUrlTag ); |
507 |
501 |
508 if ( KErrNotFound != returnValue ) |
502 if ( KErrNotFound != returnValue ) |
509 { |
503 { |
510 if ( RSat::KUrlMaxSize < url.GetLength() ) |
504 if ( RSat::KUrlMaxSize < url.GetLength() ) |
511 { |
505 { |
512 TFLOGSTRING("CSAT: CSatNotifyLaunchBrowser::ParseUrl, \ |
506 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYLAUNCHBROWSER_PARSEURLL_2, "CSAT: CSatNotifyLaunchBrowser::ParseUrl, False URL length"); |
513 False URL length"); |
|
514 CreateTerminalRespL( aPCmdNumber, RSat::KMeUnableToProcessCmd, |
507 CreateTerminalRespL( aPCmdNumber, RSat::KMeUnableToProcessCmd, |
515 KNoCause ); |
508 KNoCause ); |
516 ret = KErrCorrupt; |
509 ret = KErrCorrupt; |
517 } |
510 } |
518 else |
511 else |
520 aLaunchBrowserV2.iUrl.Copy( url.GetData( ETLV_Url ) ); |
513 aLaunchBrowserV2.iUrl.Copy( url.GetData( ETLV_Url ) ); |
521 } |
514 } |
522 } |
515 } |
523 else |
516 else |
524 { |
517 { |
525 TFLOGSTRING("CSAT: CSatNotifyLaunchBrowser::ParseUrl, \ |
518 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYLAUNCHBROWSER_PARSEURLL_3, "CSAT: CSatNotifyLaunchBrowser::ParseUrl, Required values missing"); |
526 Required values missing"); |
|
527 CreateTerminalRespL( aPCmdNumber, RSat::KErrorRequiredValuesMissing, |
519 CreateTerminalRespL( aPCmdNumber, RSat::KErrorRequiredValuesMissing, |
528 KNoCause ); |
520 KNoCause ); |
529 ret = KErrCorrupt; |
521 ret = KErrCorrupt; |
530 } |
522 } |
531 return ret; |
523 return ret; |
541 TUint8 aPCmdNumber, |
533 TUint8 aPCmdNumber, |
542 CBerTlv& aBerTlv, |
534 CBerTlv& aBerTlv, |
543 RSat::TLaunchBrowserV2& aLaunchBrowserV2 |
535 RSat::TLaunchBrowserV2& aLaunchBrowserV2 |
544 ) |
536 ) |
545 { |
537 { |
546 TFLOGSTRING("CSAT: CSatNotifyLaunchBrowser::ParseProvisioningFileList"); |
538 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYLAUNCHBROWSER_PARSEPROVISIONINGFILELISTL_1, "CSAT: CSatNotifyLaunchBrowser::ParseProvisioningFileList"); |
547 TInt ret( KErrNone ); |
539 TInt ret( KErrNone ); |
548 |
540 |
549 CTlv provisioningFileList; // optional |
541 CTlv provisioningFileList; // optional |
550 TInt returnValue = aBerTlv.TlvByTagValueMulti( &provisioningFileList, |
542 TInt returnValue = aBerTlv.TlvByTagValueMulti( &provisioningFileList, |
551 KTlvProvisioningReferenceFileTag ); |
543 KTlvProvisioningReferenceFileTag ); |
597 stringLength = ( TUint8 ) fileRefData[pos - 1]; |
589 stringLength = ( TUint8 ) fileRefData[pos - 1]; |
598 // Test whether the text contains more than "MF" |
590 // Test whether the text contains more than "MF" |
599 if ( ( RSat::KFileRefMaxSize < stringLength ) || |
591 if ( ( RSat::KFileRefMaxSize < stringLength ) || |
600 ( 4 > stringLength ) ) |
592 ( 4 > stringLength ) ) |
601 { |
593 { |
602 TFLOGSTRING("CSAT: CSatNotifyLaunchBrowser::\ |
594 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYLAUNCHBROWSER_PARSEPROVISIONINGFILELISTL_2, "CSAT: CSatNotifyLaunchBrowser::ParseProvisioningFileList, False string length"); |
603 ParseProvisioningFileList, False string length"); |
|
604 CreateTerminalRespL( aPCmdNumber, RSat::KLaunchBrowserError, |
595 CreateTerminalRespL( aPCmdNumber, RSat::KLaunchBrowserError, |
605 RSat::KMeUnableToReadProvisioningData ); |
596 RSat::KMeUnableToReadProvisioningData ); |
606 ret = KErrCorrupt; |
597 ret = KErrCorrupt; |
607 break; |
598 break; |
608 } |
599 } |
616 } |
607 } |
617 |
608 |
618 // Adding the new fileref |
609 // Adding the new fileref |
619 if ( KErrNoMemory == aLaunchBrowserV2.AddFileRef( newFileRef ) ) |
610 if ( KErrNoMemory == aLaunchBrowserV2.AddFileRef( newFileRef ) ) |
620 { |
611 { |
621 TFLOGSTRING("CSAT: CSatNotifyLaunchBrowser::\ |
612 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYLAUNCHBROWSER_PARSEPROVISIONINGFILELISTL_3, "CSAT: CSatNotifyLaunchBrowser::ParseProvisioningFileList, Menu items corrupted"); |
622 ParseProvisioningFileList, Menu items corrupted"); |
|
623 // Too many or long menuitems |
613 // Too many or long menuitems |
624 CreateTerminalRespL( aPCmdNumber, RSat::KLaunchBrowserError, |
614 CreateTerminalRespL( aPCmdNumber, RSat::KLaunchBrowserError, |
625 RSat::KMeUnableToReadProvisioningData ); |
615 RSat::KMeUnableToReadProvisioningData ); |
626 ret = KErrCorrupt; |
616 ret = KErrCorrupt; |
627 } |
617 } |
643 TUint8 aPCmdNumber, |
633 TUint8 aPCmdNumber, |
644 CBerTlv& aBerTlv, |
634 CBerTlv& aBerTlv, |
645 RSat::TLaunchBrowserV2& aLaunchBrowserV2 |
635 RSat::TLaunchBrowserV2& aLaunchBrowserV2 |
646 ) |
636 ) |
647 { |
637 { |
648 TFLOGSTRING("CSAT: CSatNotifyLaunchBrowser::ParseBearerList"); |
638 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYLAUNCHBROWSER_PARSEBEARERLISTL_1, "CSAT: CSatNotifyLaunchBrowser::ParseBearerList"); |
649 TInt ret( KErrNone ); |
639 TInt ret( KErrNone ); |
650 // Bearers (optional) |
640 // Bearers (optional) |
651 CTlv bearerList; |
641 CTlv bearerList; |
652 TInt returnValue = aBerTlv.TlvByTagValue( &bearerList, KTlvBearerTag ); |
642 TInt returnValue = aBerTlv.TlvByTagValue( &bearerList, KTlvBearerTag ); |
653 |
643 |
668 } |
658 } |
669 } |
659 } |
670 |
660 |
671 if ( 0x00 == aLaunchBrowserV2.iBearerList.Length() ) |
661 if ( 0x00 == aLaunchBrowserV2.iBearerList.Length() ) |
672 { |
662 { |
673 TFLOGSTRING("CSAT: CSatNotifyLaunchBrowser::ParseBearerList,\ |
663 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYLAUNCHBROWSER_PARSEBEARERLISTL_2, "CSAT: CSatNotifyLaunchBrowser::ParseBearerList, Bearer unvailable"); |
674 Bearer unvailable"); |
|
675 CreateTerminalRespL( aPCmdNumber, RSat::KLaunchBrowserError, |
664 CreateTerminalRespL( aPCmdNumber, RSat::KLaunchBrowserError, |
676 RSat::KBearerUnvailable ); |
665 RSat::KBearerUnvailable ); |
677 ret = KErrCorrupt; |
666 ret = KErrCorrupt; |
678 } |
667 } |
679 } |
668 } |
680 else |
669 else |
681 { |
670 { |
682 TFLOGSTRING("CSAT: CSatNotifyLaunchBrowser::ParseBearerList,\ |
671 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYLAUNCHBROWSER_PARSEBEARERLISTL_3, "CSAT: CSatNotifyLaunchBrowser::ParseBearerList, Bearer List length exceeded"); |
683 Bearer List length exceeded"); |
|
684 CreateTerminalRespL( aPCmdNumber, RSat::KCmdDataNotUnderstood, |
672 CreateTerminalRespL( aPCmdNumber, RSat::KCmdDataNotUnderstood, |
685 RSat::KCmdDataNotUnderstood ); |
673 RSat::KCmdDataNotUnderstood ); |
686 ret = KErrCorrupt; |
674 ret = KErrCorrupt; |
687 } |
675 } |
688 } |
676 } |
700 TUint8 aPCmdNumber, |
688 TUint8 aPCmdNumber, |
701 TUint8 aGeneralResult, |
689 TUint8 aGeneralResult, |
702 TUint8 aAdditionalInfo |
690 TUint8 aAdditionalInfo |
703 ) |
691 ) |
704 { |
692 { |
705 TFLOGSTRING("CSAT: CSatNotifyLaunchBrowser::CreateTerminalRespL"); |
693 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYLAUNCHBROWSER_CREATETERMINALRESPL_1, "CSAT: CSatNotifyLaunchBrowser::CreateTerminalRespL"); |
706 TTlv tlvSpecificData; |
694 TTlv tlvSpecificData; |
707 tlvSpecificData.AddTag( KTlvResultTag ); |
695 tlvSpecificData.AddTag( KTlvResultTag ); |
708 // Create General Result TLV here |
696 // Create General Result TLV here |
709 tlvSpecificData.AddByte( aGeneralResult ); |
697 tlvSpecificData.AddByte( aGeneralResult ); |
710 |
698 |