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 "CSatNotifySelectItemTraces.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 "CSatNotifySelectItem.h" // Tsy class header |
31 #include "CSatNotifySelectItem.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 CSatNotifySelectItem* CSatNotifySelectItem::NewL |
45 CSatNotifySelectItem* CSatNotifySelectItem::NewL |
41 ( |
46 ( |
42 CSatNotificationsTsy* aNotificationsTsy |
47 CSatNotificationsTsy* aNotificationsTsy |
43 ) |
48 ) |
44 { |
49 { |
45 TFLOGSTRING("CSAT: CSatNotifySelectItem::NewL"); |
50 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSELECTITEM_NEWL_1, "CSAT: CSatNotifySelectItem::NewL"); |
46 CSatNotifySelectItem* const satNotifySelectItem = |
51 CSatNotifySelectItem* const satNotifySelectItem = |
47 new ( ELeave ) CSatNotifySelectItem( aNotificationsTsy ); |
52 new ( ELeave ) CSatNotifySelectItem( aNotificationsTsy ); |
48 CleanupStack::PushL( satNotifySelectItem ); |
53 CleanupStack::PushL( satNotifySelectItem ); |
49 satNotifySelectItem->ConstructL(); |
54 satNotifySelectItem->ConstructL(); |
50 CleanupStack::Pop( satNotifySelectItem ); |
55 CleanupStack::Pop( satNotifySelectItem ); |
51 TFLOGSTRING("CSAT: CSatNotifySelectItem::NewL, end of method"); |
56 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSELECTITEM_NEWL_2, "CSAT: CSatNotifySelectItem::NewL, end of method"); |
52 return satNotifySelectItem; |
57 return satNotifySelectItem; |
53 } |
58 } |
54 |
59 |
55 // ----------------------------------------------------------------------------- |
60 // ----------------------------------------------------------------------------- |
56 // CSatNotifySelectItem::~CSatNotifySelectItem |
61 // CSatNotifySelectItem::~CSatNotifySelectItem |
60 CSatNotifySelectItem::~CSatNotifySelectItem |
65 CSatNotifySelectItem::~CSatNotifySelectItem |
61 ( |
66 ( |
62 // None |
67 // None |
63 ) |
68 ) |
64 { |
69 { |
65 TFLOGSTRING("CSAT: CSatNotifySelectItem::~CSatNotifySelectItem"); |
70 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSELECTITEM_DTOR_1, "CSAT: CSatNotifySelectItem::~CSatNotifySelectItem"); |
66 } |
71 } |
67 |
72 |
68 // ----------------------------------------------------------------------------- |
73 // ----------------------------------------------------------------------------- |
69 // CSatNotifySelectItem::CSatNotifySelectItem |
74 // CSatNotifySelectItem::CSatNotifySelectItem |
70 // Default C++ constructor |
75 // Default C++ constructor |
86 void CSatNotifySelectItem::ConstructL |
91 void CSatNotifySelectItem::ConstructL |
87 ( |
92 ( |
88 // None |
93 // None |
89 ) |
94 ) |
90 { |
95 { |
91 TFLOGSTRING("CSAT: CSatNotifySelectItem::ConstructL"); |
96 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSELECTITEM_CONSTRUCTL_1, "CSAT: CSatNotifySelectItem::ConstructL"); |
92 // Initiliaze Item Next Indicator flag |
97 // Initiliaze Item Next Indicator flag |
93 iItemNextIndicatorRemoved = EFalse; |
98 iItemNextIndicatorRemoved = EFalse; |
94 } |
99 } |
95 |
100 |
96 // ----------------------------------------------------------------------------- |
101 // ----------------------------------------------------------------------------- |
103 ( |
108 ( |
104 const TTsyReqHandle aTsyReqHandle, |
109 const TTsyReqHandle aTsyReqHandle, |
105 const TDataPackage& aPackage |
110 const TDataPackage& aPackage |
106 ) |
111 ) |
107 { |
112 { |
108 TFLOGSTRING("CSAT: CSatNotifySelectItem::Notify"); |
113 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSELECTITEM_NOTIFY_1, "CSAT: CSatNotifySelectItem::Notify"); |
109 // Save data pointer to client side for completion |
114 // Save data pointer to client side for completion |
110 iSelectItemV2Pckg = reinterpret_cast<RSat::TSelectItemV2Pckg*>( |
115 iSelectItemV2Pckg = reinterpret_cast<RSat::TSelectItemV2Pckg*>( |
111 aPackage.Des1n() ); |
116 aPackage.Des1n() ); |
112 // Save the request handle |
117 // Save the request handle |
113 iNotificationsTsy->iSatTsy->SaveReqHandle( aTsyReqHandle, |
118 iNotificationsTsy->iSatTsy->SaveReqHandle( aTsyReqHandle, |
126 TInt CSatNotifySelectItem::CancelNotification |
131 TInt CSatNotifySelectItem::CancelNotification |
127 ( |
132 ( |
128 const TTsyReqHandle aTsyReqHandle |
133 const TTsyReqHandle aTsyReqHandle |
129 ) |
134 ) |
130 { |
135 { |
131 TFLOGSTRING("CSAT: CSatNotifySelectItem::CancelNotification"); |
136 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSELECTITEM_CANCELNOTIFICATION_1, "CSAT: CSatNotifySelectItem::CancelNotification"); |
132 // Reset the request handle |
137 // Reset the request handle |
133 TTsyReqHandle reqHandle = iNotificationsTsy->iSatReqHandleStore-> |
138 TTsyReqHandle reqHandle = iNotificationsTsy->iSatReqHandleStore-> |
134 ResetTsyReqHandle( CSatTsy::ESatNotifySelectItemPCmdReqType ); |
139 ResetTsyReqHandle( CSatTsy::ESatNotifySelectItemPCmdReqType ); |
135 // Reset the data pointer |
140 // Reset the data pointer |
136 iSelectItemV2Pckg = NULL; |
141 iSelectItemV2Pckg = NULL; |
149 ( |
154 ( |
150 CSatDataPackage* aDataPackage, |
155 CSatDataPackage* aDataPackage, |
151 TInt aErrorCode |
156 TInt aErrorCode |
152 ) |
157 ) |
153 { |
158 { |
154 TFLOGSTRING("CSAT: CSatNotifySelectItem::CompleteNotifyL"); |
159 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSELECTITEM_COMPLETENOTIFYL_1, "CSAT: CSatNotifySelectItem::CompleteNotifyL"); |
155 TInt ret( KErrNone ); |
160 TInt ret( KErrNone ); |
156 // Unpack parameters |
161 // Unpack parameters |
157 TPtrC8* data; |
162 TPtrC8* data; |
158 aDataPackage->UnPackData( &data ); |
163 aDataPackage->UnPackData( &data ); |
159 TBuf<1> additionalInfo; |
164 TBuf<1> additionalInfo; |
221 { |
226 { |
222 selectItemV2.iAlphaId.iStatus = RSat::EAlphaIdProvided; |
227 selectItemV2.iAlphaId.iStatus = RSat::EAlphaIdProvided; |
223 } |
228 } |
224 else |
229 else |
225 { |
230 { |
226 TFLOGSTRING("CSAT: CSatNotifySelectItem::\ |
231 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSELECTITEM_COMPLETENOTIFYL_2, "CSAT: CSatNotifySelectItem::CompleteNotifyL, Alpha ID is NULL"); |
227 CompleteNotifyL, Alpha ID is NULL"); |
|
228 selectItemV2.iAlphaId.iStatus = RSat::EAlphaIdNull; |
232 selectItemV2.iAlphaId.iStatus = RSat::EAlphaIdNull; |
229 } |
233 } |
230 } |
234 } |
231 } |
235 } |
232 // Alpha id not present |
236 // Alpha id not present |
233 else |
237 else |
234 { |
238 { |
235 TFLOGSTRING("CSAT: CSatNotifySelectItem::CompleteNotifyL\ |
239 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSELECTITEM_COMPLETENOTIFYL_3, "CSAT: CSatNotifySelectItem::CompleteNotifyL Alpha ID not present"); |
236 Alpha ID not present"); |
|
237 selectItemV2.iAlphaId.iStatus = RSat::EAlphaIdNotPresent; |
240 selectItemV2.iAlphaId.iStatus = RSat::EAlphaIdNotPresent; |
238 } |
241 } |
239 // Help information |
242 // Help information |
240 if ( KHelpAvailabilityMask & cmdQualifier ) |
243 if ( KHelpAvailabilityMask & cmdQualifier ) |
241 { |
244 { |
242 // Help information available |
245 // Help information available |
243 selectItemV2.iHelp = RSat::EHelpAvailable; |
246 selectItemV2.iHelp = RSat::EHelpAvailable; |
244 } |
247 } |
245 else |
248 else |
246 { |
249 { |
247 TFLOGSTRING("CSAT: CSatNotifySelectItem::CompleteNotifyL,\ |
250 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSELECTITEM_COMPLETENOTIFYL_4, "CSAT: CSatNotifySelectItem::CompleteNotifyL, No Help available"); |
248 No Help available"); |
|
249 // No help |
251 // No help |
250 selectItemV2.iHelp = RSat::ENoHelpAvailable; |
252 selectItemV2.iHelp = RSat::ENoHelpAvailable; |
251 } |
253 } |
252 // Presentation as a choice of navigation options |
254 // Presentation as a choice of navigation options |
253 if ( KSelectItemChoiceOfNavigation == ( KSelectItemPresentationTypeMask & cmdQualifier ) ) |
255 if ( KSelectItemChoiceOfNavigation == ( KSelectItemPresentationTypeMask & cmdQualifier ) ) |
322 selectItemV2.iIconListQualifier = RSat::ESelfExplanatory; |
324 selectItemV2.iIconListQualifier = RSat::ESelfExplanatory; |
323 } |
325 } |
324 } |
326 } |
325 else if ( KErrNotFound == retValue ) |
327 else if ( KErrNotFound == retValue ) |
326 { |
328 { |
327 TFLOGSTRING("CSAT: CSatNotifySelectItem::CompleteNotifyL,\ |
329 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSELECTITEM_COMPLETENOTIFYL_5, "CSAT: CSatNotifySelectItem::CompleteNotifyL, No Icon ID"); |
328 No Icon ID"); |
|
329 selectItemV2.iIconListQualifier = RSat::ENoIconId; |
330 selectItemV2.iIconListQualifier = RSat::ENoIconId; |
330 } |
331 } |
331 else |
332 else |
332 { |
333 { |
333 TFLOGSTRING("CSAT: CSatNotifySelectItem::CompleteNotifyL, \ |
334 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSELECTITEM_COMPLETENOTIFYL_6, "CSAT: CSatNotifySelectItem::CompleteNotifyL, Return value not valid."); |
334 Return value not valid."); |
|
335 } |
335 } |
336 |
336 |
337 ret = HandleItemsL( pCmdNumber, &berTlv, ret, iconIdList, |
337 ret = HandleItemsL( pCmdNumber, &berTlv, ret, iconIdList, |
338 &selectItemV2 ); |
338 &selectItemV2 ); |
339 |
339 |
348 iNotificationsTsy->iSatTsy->ReqCompleted( reqHandle, ret ); |
348 iNotificationsTsy->iSatTsy->ReqCompleted( reqHandle, ret ); |
349 |
349 |
350 } // End of if ( CSatTsy::ESatReqHandleUnknown != reqHandle ) |
350 } // End of if ( CSatTsy::ESatReqHandleUnknown != reqHandle ) |
351 else |
351 else |
352 { |
352 { |
353 TFLOGSTRING("CSAT: CSatNotifySelectItem::CompleteNotifyL,\ |
353 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSELECTITEM_COMPLETENOTIFYL_7, "CSAT: CSatNotifySelectItem::CompleteNotifyL, Request not ongoing"); |
354 Request not ongoing"); |
|
355 // Request not on, returning response immediately |
354 // Request not on, returning response immediately |
356 additionalInfo.Zero(); |
355 additionalInfo.Zero(); |
357 additionalInfo.Append( KNoCause ); |
356 additionalInfo.Append( KNoCause ); |
358 CreateTerminalRespL( pCmdNumber, RSat::KMeUnableToProcessCmd, |
357 CreateTerminalRespL( pCmdNumber, RSat::KMeUnableToProcessCmd, |
359 additionalInfo ); |
358 additionalInfo ); |
370 TInt CSatNotifySelectItem::TerminalResponseL |
369 TInt CSatNotifySelectItem::TerminalResponseL |
371 ( |
370 ( |
372 TDes8* aRsp |
371 TDes8* aRsp |
373 ) |
372 ) |
374 { |
373 { |
375 TFLOGSTRING("CSAT:: CSatNotifySelectItem::TerminalResponseL"); |
374 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSELECTITEM_TERMINALRESPONSEL_1, "CSAT:: CSatNotifySelectItem::TerminalResponseL"); |
376 |
375 |
377 TInt ret( KErrNone ); |
376 TInt ret( KErrNone ); |
378 TBuf<1> additionalInfo; |
377 TBuf<1> additionalInfo; |
379 RSat::TSelectItemRspV1Pckg* aRspPckg = |
378 RSat::TSelectItemRspV1Pckg* aRspPckg = |
380 reinterpret_cast<RSat::TSelectItemRspV1Pckg*> ( aRsp ); |
379 reinterpret_cast<RSat::TSelectItemRspV1Pckg*> ( aRsp ); |
390 && ( RSat::KNoResponseFromUser != rspV1.iGeneralResult ) |
389 && ( RSat::KNoResponseFromUser != rspV1.iGeneralResult ) |
391 && ( RSat::KHelpRequestedByUser != rspV1.iGeneralResult ) |
390 && ( RSat::KHelpRequestedByUser != rspV1.iGeneralResult ) |
392 && ( RSat::KMeUnableToProcessCmd != rspV1.iGeneralResult ) |
391 && ( RSat::KMeUnableToProcessCmd != rspV1.iGeneralResult ) |
393 && ( RSat::KCmdBeyondMeCapabilities != rspV1.iGeneralResult ) ) |
392 && ( RSat::KCmdBeyondMeCapabilities != rspV1.iGeneralResult ) ) |
394 { |
393 { |
395 TFLOGSTRING("CSAT: CSatNotifySelectItem::CompleteNotifyL,\ |
394 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSELECTITEM_TERMINALRESPONSEL_2, "CSAT: CSatNotifySelectItem::CompleteNotifyL, Invalid General Result"); |
396 Invalid General Result"); |
|
397 ret = KErrCorrupt; |
395 ret = KErrCorrupt; |
398 } |
396 } |
399 // If there is ME (Mobile Entity) error or there there should be |
397 // If there is ME (Mobile Entity) error or there there should be |
400 // item identifier or |
398 // item identifier or |
401 // general result is success, additional info is needed |
399 // general result is success, additional info is needed |
404 || ( RSat::KSuccess == rspV1.iGeneralResult ) ) |
402 || ( RSat::KSuccess == rspV1.iGeneralResult ) ) |
405 { |
403 { |
406 // Check the length of additional info |
404 // Check the length of additional info |
407 if ( rspV1.iAdditionalInfo.Length() != 0 ) |
405 if ( rspV1.iAdditionalInfo.Length() != 0 ) |
408 { |
406 { |
409 TFLOGSTRING2("CSAT: CSatNotifySelectItem::TerminalResponseL, \ |
407 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSELECTITEM_TERMINALRESPONSEL_3, "CSAT: CSatNotifySelectItem::TerminalResponseL, Additional info: %S", rspV1.iAdditionalInfo); |
410 Additional info: %S", &rspV1.iAdditionalInfo); |
|
411 additionalInfo.Zero(); |
408 additionalInfo.Zero(); |
412 additionalInfo.Append( rspV1.iAdditionalInfo[0] ); |
409 additionalInfo.Append( rspV1.iAdditionalInfo[0] ); |
413 TFLOGSTRING2("CSAT: CSatNotifySelectItem::TerminalResponseL, \ |
410 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSELECTITEM_TERMINALRESPONSEL_4, "CSAT: CSatNotifySelectItem::TerminalResponseL, Additional info: %S", additionalInfo); |
414 Additional info: %S", &additionalInfo); |
|
415 } |
411 } |
416 else |
412 else |
417 { |
413 { |
418 TFLOGSTRING("CSAT: CSatNotifySelectItem::CompleteNotifyL,\ |
414 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSELECTITEM_TERMINALRESPONSEL_5, "CSAT: CSatNotifySelectItem::CompleteNotifyL, Invalid Additional Info"); |
419 Invalid Additional Info"); |
|
420 ret = KErrCorrupt; |
415 ret = KErrCorrupt; |
421 } |
416 } |
422 } |
417 } |
423 |
418 |
424 if ( RSat::KSuccess == rspV1.iGeneralResult ) |
419 if ( RSat::KSuccess == rspV1.iGeneralResult ) |
425 { |
420 { |
426 if (iItemNextIndicatorRemoved) |
421 if (iItemNextIndicatorRemoved) |
427 { |
422 { |
428 TFLOGSTRING("CSatNotifySelectItem::TerminalResponseL, Partial Comprehension, \ |
423 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSELECTITEM_TERMINALRESPONSEL_6, "CSatNotifySelectItem::TerminalResponseL, Partial Comprehension, iItemNextIndicatorRemoved"); |
429 iItemNextIndicatorRemoved"); |
|
430 rspV1.iGeneralResult = RSat::KPartialComprehension; |
424 rspV1.iGeneralResult = RSat::KPartialComprehension; |
431 } |
425 } |
432 if (iItemsIconIdListRemoved) |
426 if (iItemsIconIdListRemoved) |
433 { |
427 { |
434 TFLOGSTRING("CSatNotifySelectItem::TerminalResponseL, Partial Comprehension, \ |
428 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSELECTITEM_TERMINALRESPONSEL_7, "CSatNotifySelectItem::TerminalResponseL, Partial Comprehension, iItemsIconIdListRemoved"); |
435 iItemsIconIdListRemoved"); |
|
436 rspV1.iGeneralResult = RSat::KPartialComprehension; |
429 rspV1.iGeneralResult = RSat::KPartialComprehension; |
437 } |
430 } |
438 } |
431 } |
439 |
432 |
440 iItemNextIndicatorRemoved = EFalse; |
433 iItemNextIndicatorRemoved = EFalse; |
458 TUint8 aPCmdNumber, |
451 TUint8 aPCmdNumber, |
459 TUint8 aGeneralResult, |
452 TUint8 aGeneralResult, |
460 TDesC16& aAdditionalInfo |
453 TDesC16& aAdditionalInfo |
461 ) |
454 ) |
462 { |
455 { |
463 TFLOGSTRING2("CSAT: CSatNotifySelectItem::CreateTerminalRespL, \ |
456 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSELECTITEM_CREATETERMINALRESPL_1, "CSAT: CSatNotifySelectItem::CreateTerminalRespL, Additional info: %S", aAdditionalInfo); |
464 Additional info: %S", &aAdditionalInfo); |
|
465 |
457 |
466 TTlv tlvSpecificData; |
458 TTlv tlvSpecificData; |
467 // Create General Result TLV here |
459 // Create General Result TLV here |
468 tlvSpecificData.AddTag( KTlvResultTag ); |
460 tlvSpecificData.AddTag( KTlvResultTag ); |
469 // General result |
461 // General result |
673 { |
665 { |
674 // ADD ITEM WITH ITEM NEXT INDICATOR AND ICON IDENTIFIER |
666 // ADD ITEM WITH ITEM NEXT INDICATOR AND ICON IDENTIFIER |
675 if ( KErrNoMemory == aSelectItemV2->AddItem( |
667 if ( KErrNoMemory == aSelectItemV2->AddItem( |
676 newItem, itemNextIndicator[i], aIconIdList[i] ) ) |
668 newItem, itemNextIndicator[i], aIconIdList[i] ) ) |
677 { |
669 { |
678 TFLOGSTRING("CSAT: CSatNotifySelectItem::HandleItemsL,\ |
670 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSELECTITEM_HANDLEITEMSL_2, "CSAT: CSatNotifySelectItem::HandleItemsL, Icon data length exceeded, AddItem1"); |
679 Icon data length exceeded, AddItem1"); |
|
680 // Too many or long menu items |
671 // Too many or long menu items |
681 ret = KErrCorrupt; |
672 ret = KErrCorrupt; |
682 } |
673 } |
683 } |
674 } |
684 // ADD ITEM WITH ICON |
675 // ADD ITEM WITH ICON |
685 else if ( KErrNoMemory == aSelectItemV2->AddItemIcon( |
676 else if ( KErrNoMemory == aSelectItemV2->AddItemIcon( |
686 newItem, aIconIdList[i] ) ) |
677 newItem, aIconIdList[i] ) ) |
687 { |
678 { |
688 TFLOGSTRING("CSAT: CSatNotifySelectItem::HandleItemsL,\ |
679 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSELECTITEM_HANDLEITEMSL_3, "CSAT: CSatNotifySelectItem::HandleItemsL, Icon data length exceeded, AddItemIcon"); |
689 Icon data length exceeded, AddItemIcon"); |
|
690 // Too many or long menu items |
680 // Too many or long menu items |
691 ret = KErrCorrupt; |
681 ret = KErrCorrupt; |
692 } |
682 } |
693 } |
683 } |
694 else |
684 else |
698 { |
688 { |
699 // ADD ITEM WITH ITEM NEXT INDICATOR |
689 // ADD ITEM WITH ITEM NEXT INDICATOR |
700 if ( KErrNoMemory == aSelectItemV2->AddItem( |
690 if ( KErrNoMemory == aSelectItemV2->AddItem( |
701 newItem, itemNextIndicator[i] ) ) |
691 newItem, itemNextIndicator[i] ) ) |
702 { |
692 { |
703 TFLOGSTRING("CSAT: CSatNotifySelectItem::HandleItemsL,\ |
693 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSELECTITEM_HANDLEITEMSL_4, "CSAT: CSatNotifySelectItem::HandleItemsL, Icon data length exceeded, AddItem2"); |
704 Icon data length exceeded, AddItem2"); |
|
705 // Too many or long menu items |
694 // Too many or long menu items |
706 ret = KErrCorrupt; |
695 ret = KErrCorrupt; |
707 } |
696 } |
708 } |
697 } |
709 //ADD ITEM |
698 //ADD ITEM |
710 else |
699 else |
711 { |
700 { |
712 TInt retAdd = aSelectItemV2->AddItem( newItem ); |
701 TInt retAdd = aSelectItemV2->AddItem( newItem ); |
713 if ( KErrNoMemory == retAdd ) |
702 if ( KErrNoMemory == retAdd ) |
714 { |
703 { |
715 TFLOGSTRING("CSAT: CSatNotifySelectItem::HandleItemsL,\ |
704 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSELECTITEM_HANDLEITEMSL_5, "CSAT: CSatNotifySelectItem::HandleItemsL, AddItem failed -> KErrNoMemory"); |
716 AddItem failed -> KErrNoMemory"); |
|
717 // Too many or long menu items |
705 // Too many or long menu items |
718 // If there is not enough space left in the buffer used |
706 // If there is not enough space left in the buffer used |
719 // by the menu KErrNoMemory is returned. |
707 // by the menu KErrNoMemory is returned. |
720 TBuf<1> additionalInfo; |
708 TBuf<1> additionalInfo; |
721 additionalInfo.Zero(); |
709 additionalInfo.Zero(); |