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