telephonyserverplugins/simatktsy/src/CSatNotifySetUpMenu.cpp
branchRCL_3
changeset 20 07a122eea281
parent 19 630d2f34d719
equal deleted inserted replaced
19:630d2f34d719 20:07a122eea281
     1 // Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2006-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 "CSatNotifySetUpMenuTraces.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 "CSatNotifySetUpMenu.h"    // Tsy class header
    25 #include "CSatNotifySetUpMenu.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 CSatNotifySetUpMenu* CSatNotifySetUpMenu::NewL
    40 CSatNotifySetUpMenu* CSatNotifySetUpMenu::NewL
    46         ( 
    41         ( 
    47         CSatNotificationsTsy* aNotificationsTsy 
    42         CSatNotificationsTsy* aNotificationsTsy 
    48         )
    43         )
    49     {
    44     {
    50     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPMENU_NEWL_1, "CSAT: CSatNotifySetUpMenu::NewL");
    45     TFLOGSTRING("CSAT: CSatNotifySetUpMenu::NewL");
    51    	CSatNotifySetUpMenu* const satNotifySetUpMenu = 
    46    	CSatNotifySetUpMenu* const satNotifySetUpMenu = 
    52         new ( ELeave ) CSatNotifySetUpMenu( aNotificationsTsy );
    47         new ( ELeave ) CSatNotifySetUpMenu( aNotificationsTsy );
    53     CleanupStack::PushL( satNotifySetUpMenu );
    48     CleanupStack::PushL( satNotifySetUpMenu );
    54     satNotifySetUpMenu->ConstructL();
    49     satNotifySetUpMenu->ConstructL();
    55     CleanupStack::Pop( satNotifySetUpMenu );
    50     CleanupStack::Pop( satNotifySetUpMenu );
    56     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPMENU_NEWL_2, "CSAT: CSatNotifySetUpMenu::NewL");
    51     TFLOGSTRING("CSAT: CSatNotifySetUpMenu::NewL");
    57     return satNotifySetUpMenu;
    52     return satNotifySetUpMenu;
    58     }
    53     }
    59 
    54 
    60 // -----------------------------------------------------------------------------
    55 // -----------------------------------------------------------------------------
    61 // CSatNotifySetUpMenu::~CSatNotifySetUpMenu
    56 // CSatNotifySetUpMenu::~CSatNotifySetUpMenu
    65 CSatNotifySetUpMenu::~CSatNotifySetUpMenu
    60 CSatNotifySetUpMenu::~CSatNotifySetUpMenu
    66         ( 
    61         ( 
    67 		// None
    62 		// None
    68         )
    63         )
    69     {
    64     {
    70     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPMENU_DTOR_1, "CSAT: CSatNotifySetUpMenu::~CSatNotifySetUpMenu");
    65     TFLOGSTRING("CSAT: CSatNotifySetUpMenu::~CSatNotifySetUpMenu");
    71     }
    66     }
    72     
    67     
    73 // -----------------------------------------------------------------------------
    68 // -----------------------------------------------------------------------------
    74 // CSatNotifySetUpMenu::CSatNotifySetUpMenu
    69 // CSatNotifySetUpMenu::CSatNotifySetUpMenu
    75 // Default C++ constructor
    70 // Default C++ constructor
    91 void CSatNotifySetUpMenu::ConstructL
    86 void CSatNotifySetUpMenu::ConstructL
    92         (
    87         (
    93         // None
    88         // None
    94         )
    89         )
    95     {
    90     {
    96     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPMENU_CONSTRUCTL_1, "CSAT: CSatNotifySetUpMenu::ConstructL");
    91     TFLOGSTRING("CSAT: CSatNotifySetUpMenu::ConstructL");
    97     iItemsNextIndicatorRemoved = EFalse;
    92     iItemsNextIndicatorRemoved = EFalse;
    98     }
    93     }
    99 
    94 
   100 // -----------------------------------------------------------------------------
    95 // -----------------------------------------------------------------------------
   101 // CSatNotifySetUpMenu::Notify
    96 // CSatNotifySetUpMenu::Notify
   107         (
   102         (
   108         const TTsyReqHandle aTsyReqHandle,
   103         const TTsyReqHandle aTsyReqHandle,
   109         const TDataPackage& aPackage    
   104         const TDataPackage& aPackage    
   110         )
   105         )
   111     {
   106     {
   112     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPMENU_NOTIFY_1, "CSAT: CSatNotifySetUpMenu::Notify");
   107     TFLOGSTRING("CSAT: CSatNotifySetUpMenu::Notify");
   113     // Save data pointer to client side for completion
   108     // Save data pointer to client side for completion
   114     iSetUpMenuV2Pckg = reinterpret_cast<RSat::TSetUpMenuV2Pckg*>( 
   109     iSetUpMenuV2Pckg = reinterpret_cast<RSat::TSetUpMenuV2Pckg*>( 
   115         aPackage.Des1n() );
   110         aPackage.Des1n() );
   116     // Save the request handle
   111     // Save the request handle
   117     iNotificationsTsy->iSatTsy->SaveReqHandle( aTsyReqHandle, 
   112     iNotificationsTsy->iSatTsy->SaveReqHandle( aTsyReqHandle, 
   131 TInt CSatNotifySetUpMenu::CancelNotification
   126 TInt CSatNotifySetUpMenu::CancelNotification
   132         (
   127         (
   133         const TTsyReqHandle aTsyReqHandle		
   128         const TTsyReqHandle aTsyReqHandle		
   134         )
   129         )
   135     {
   130     {
   136     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPMENU_CANCELNOTIFICATION_1, "CSAT: CSatNotifySetUpMenu::CancelNotification");
   131     TFLOGSTRING("CSAT: CSatNotifySetUpMenu::CancelNotification");
   137     // Reset the request handle
   132     // Reset the request handle
   138     TTsyReqHandle reqHandle = iNotificationsTsy->iSatReqHandleStore->
   133     TTsyReqHandle reqHandle = iNotificationsTsy->iSatReqHandleStore->
   139         ResetTsyReqHandle( CSatTsy::ESatNotifySetUpMenuPCmdReqType );
   134         ResetTsyReqHandle( CSatTsy::ESatNotifySetUpMenuPCmdReqType );
   140 	// Reset the data pointer
   135 	// Reset the data pointer
   141 	iSetUpMenuV2Pckg = NULL;
   136 	iSetUpMenuV2Pckg = NULL;
   153 		(
   148 		(
   154         CSatDataPackage* aDataPackage,   
   149         CSatDataPackage* aDataPackage,   
   155         TInt aErrorCode                  
   150         TInt aErrorCode                  
   156         )
   151         )
   157     {
   152     {
   158     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPMENU_COMPLETENOTIFYL_1, "CSAT: CSatNotifySetUpMenu::CompleteNotifyL");
   153     TFLOGSTRING("CSAT: CSatNotifySetUpMenu::CompleteNotifyL");
   159     TInt ret( KErrNone );
   154     TInt ret( KErrNone );
   160 	TInt returnValue( KErrNone );
   155 	TInt returnValue( KErrNone );
   161 	// Unpack parameters
   156 	// Unpack parameters
   162     TPtrC8* data;
   157     TPtrC8* data;
   163     aDataPackage->UnPackData( &data );
   158     aDataPackage->UnPackData( &data );
   165 	// Reset req handle. Returns the deleted req handle
   160 	// Reset req handle. Returns the deleted req handle
   166     TTsyReqHandle reqHandle = 
   161     TTsyReqHandle reqHandle = 
   167         iNotificationsTsy->iSatReqHandleStore->ResetTsyReqHandle(
   162         iNotificationsTsy->iSatReqHandleStore->ResetTsyReqHandle(
   168 		CSatTsy::ESatNotifySetUpMenuPCmdReqType );
   163 		CSatTsy::ESatNotifySetUpMenuPCmdReqType );
   169 		
   164 		
   170 	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPMENU_COMPLETENOTIFYL_2, "CSAT: CSatNotifySetUpMenu::CompleteNotifyL reqHandle is :%d", reqHandle );
   165 	TFLOGSTRING2("CSAT: CSatNotifySetUpMenu::CompleteNotifyL reqHandle is :%d", 
       
   166         reqHandle );
   171 					
   167 					
   172 	// Get ber tlv 
   168 	// Get ber tlv 
   173     CBerTlv berTlv;
   169     CBerTlv berTlv;
   174     berTlv.SetData( *data );
   170     berTlv.SetData( *data );
   175     // Get command details tlv
   171     // Get command details tlv
   223 			else
   219 			else
   224 				{
   220 				{
   225     
   221     
   226 				TUint16 alphaIdLength = alphaIdentifier.GetLength();
   222 				TUint16 alphaIdLength = alphaIdentifier.GetLength();
   227 
   223 
   228 				OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPMENU_COMPLETENOTIFYL_3, "CSAT: Alpha ID length:%d", alphaIdLength );
   224 				TFLOGSTRING2("CSAT: Alpha ID length:%d", alphaIdLength );
   229 
   225 
   230 				if ( RSat::KAlphaIdMaxSize < alphaIdLength )
   226 				if ( RSat::KAlphaIdMaxSize < alphaIdLength )
   231 					{
   227 					{
   232 					// String too long
   228 					// String too long
   233 					ret = KErrCorrupt;
   229 					ret = KErrCorrupt;
   241 					TSatUtility::SetAlphaId( temp , menu.iAlphaId.iAlphaId ); 
   237 					TSatUtility::SetAlphaId( temp , menu.iAlphaId.iAlphaId ); 
   242 
   238 
   243 					// Set SAT toolikit name, send SAT SMS logging purpose
   239 					// Set SAT toolikit name, send SAT SMS logging purpose
   244 					iToolKitName.Copy( menu.iAlphaId.iAlphaId );
   240 					iToolKitName.Copy( menu.iAlphaId.iAlphaId );
   245 
   241 
   246 					OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPMENU_COMPLETENOTIFYL_4, "CSAT: CSatNotifySetUpMenu::CompleteNotifyL, iToolKitName:%S", iToolKitName );
   242 					TFLOGSTRING2("CSAT: CSatNotifySetUpMenu::CompleteNotifyL, \
       
   243                         iToolKitName:%S", &iToolKitName );
   247 					}
   244 					}
   248 				else
   245 				else
   249 					{
   246 					{
   250 					OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPMENU_COMPLETENOTIFYL_5, "CSAT: CSatNotifySetUpMenu::CompleteNotifyL, Wrong length of alpha id.");
   247 					TFLOGSTRING("CSAT: CSatNotifySetUpMenu::CompleteNotifyL,\
       
   248         				Wrong length of alpha id.");
   251 					}
   249 					}
   252 
   250 
   253 				// Alpha Id status
   251 				// Alpha Id status
   254 				if ( menu.iAlphaId.iAlphaId.Length() )
   252 				if ( menu.iAlphaId.iAlphaId.Length() )
   255 					{
   253 					{
   256 					menu.iAlphaId.iStatus = RSat::EAlphaIdProvided;
   254 					menu.iAlphaId.iStatus = RSat::EAlphaIdProvided;
   257 					}
   255 					}
   258 				else
   256 				else
   259 					{
   257 					{
   260 					OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPMENU_COMPLETENOTIFYL_6, "CSAT: CSatNotifySetUpMenu::CompleteNotifyL, Alpha ID is NULL");
   258 					TFLOGSTRING("CSAT: CSatNotifySetUpMenu::CompleteNotifyL,\
       
   259 					    Alpha ID is NULL");
   261 					menu.iAlphaId.iStatus = RSat::EAlphaIdNull;
   260 					menu.iAlphaId.iStatus = RSat::EAlphaIdNull;
   262 					}
   261 					}
   263 
   262 
   264 				// Help information.
   263 				// Help information.
   265 				if ( commandDetails.GetShortInfo( ETLV_CommandQualifier ) 
   264 				if ( commandDetails.GetShortInfo( ETLV_CommandQualifier ) 
   268 					// Help information available
   267 					// Help information available
   269 					menu.iHelp = RSat::EHelpAvailable;
   268 					menu.iHelp = RSat::EHelpAvailable;
   270 					}
   269 					}
   271 				else
   270 				else
   272 					{
   271 					{
   273 					OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPMENU_COMPLETENOTIFYL_7, "CSAT: CSatNotifySetUpMenu::CompleteNotifyL, No Help available");
   272 					TFLOGSTRING("CSAT: CSatNotifySetUpMenu::CompleteNotifyL,\
       
   273 					    No Help available");
   274 					// No help
   274 					// No help
   275 					menu.iHelp = RSat::ENoHelpAvailable;
   275 					menu.iHelp = RSat::ENoHelpAvailable;
   276 					}
   276 					}
   277 
   277 
   278 				// Icon identifier
   278 				// Icon identifier
   305                     }
   305                     }
   306 
   306 
   307                 }
   307                 }
   308             else if ( KErrNotFound == retValue )
   308             else if ( KErrNotFound == retValue )
   309                 {
   309                 {
   310                 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPMENU_COMPLETENOTIFYL_8, "CSAT: CSatNotifySetUpMenu::CompleteNotifyL, No Icon ID");
   310                 TFLOGSTRING("CSAT: CSatNotifySetUpMenu::CompleteNotifyL,\
       
   311                     No Icon ID");
   311                 menu.iIconListQualifier = RSat::ENoIconId;
   312                 menu.iIconListQualifier = RSat::ENoIconId;
   312                 }
   313                 }
   313             else
   314             else
   314             	{
   315             	{
   315 	            OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPMENU_COMPLETENOTIFYL_9, "CSAT: CSatNotifySetUpMenu::CompleteNotifyL, Wrong return value of icon identifier list.");
   316 	            TFLOGSTRING("CSAT: CSatNotifySetUpMenu::CompleteNotifyL, \
       
   317         			Wrong return value of icon identifier list.");	
   316            		}	
   318            		}	
   317            	
   319            	
   318 	        //Items Data
   320 	        //Items Data
   319 	        TInt itemNbr( 0 );
   321 	        TInt itemNbr( 0 );
   320 	        CTlv itemsData;
   322 	        CTlv itemsData;
   372                     RSat::TItem newItem;
   374                     RSat::TItem newItem;
   373                                      
   375                                      
   374                     // Suffle through all the menu items
   376                     // Suffle through all the menu items
   375                     stringLength = 0;
   377                     stringLength = 0;
   376 
   378 
   377                     OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPMENU_COMPLETENOTIFYL_10, "CSAT: CSatNotifySetUpMenu::CompleteNotifyL, item number:%d", i );
   379                     TFLOGSTRING2("CSAT: CSatNotifySetUpMenu::CompleteNotifyL, \
       
   380                         item number:%d", i );
   378                     
   381                     
   379                     // Fill the new item
   382                     // Fill the new item
   380                     newItem.iItemId = itemsData.GetShortInfo( 
   383                     newItem.iItemId = itemsData.GetShortInfo( 
   381                         ETLV_IdentifierOfItem );
   384                         ETLV_IdentifierOfItem );
   382                     stringLength = itemsData.GetLength();
   385                     stringLength = itemsData.GetLength();
   399                         {
   402                         {
   400                         TSatUtility::Convert7BitToUnicode16( itemData,
   403                         TSatUtility::Convert7BitToUnicode16( itemData,
   401                             newItem.iItemString );
   404                             newItem.iItemString );
   402                         }
   405                         }
   403             
   406             
   404                     OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPMENU_COMPLETENOTIFYL_11, "CSAT: CSatNotifySetUpMenu::CompleteNotifyL newItem.iItemString:%S", newItem.iItemString );
   407                     TFLOGSTRING2("CSAT: CSatNotifySetUpMenu::CompleteNotifyL \
       
   408                         newItem.iItemString:%S", &newItem.iItemString );
   405 
   409 
   406 	                // Adding the new menuitem
   410 	                // Adding the new menuitem
   407 	                if( NULL != iconIdList.Size()  && ( i < iconIdList.Length() ) )
   411 	                if( NULL != iconIdList.Size()  && ( i < iconIdList.Length() ) )
   408 	                    {
   412 	                    {
   409 	                    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPMENU_COMPLETENOTIFYL_12, "CSAT: CSatNotifySetUpMenu::CompleteNotifyL Icons on the list" );
   413 	                    TFLOGSTRING("CSAT: CSatNotifySetUpMenu::CompleteNotifyL \
       
   414 	                            Icons on the list" );
   410 	                    if( ( NULL != itemNextIndicator.Size() ) 
   415 	                    if( ( NULL != itemNextIndicator.Size() ) 
   411 	                        && ( i < itemNextIndicator.Length() ) )
   416 	                        && ( i < itemNextIndicator.Length() ) )
   412 	                        {
   417 	                        {
   413 	                        // Menu item with item next idicator and icon identifier
   418 	                        // Menu item with item next idicator and icon identifier
   414 	                        if ( KErrNoMemory == menu.AddItem( newItem, 
   419 	                        if ( KErrNoMemory == menu.AddItem( newItem, 
   415 	                             itemNextIndicator[i], iconIdList[i] ) )
   420 	                             itemNextIndicator[i], iconIdList[i] ) )
   416 	                            {
   421 	                            {
   417 	                            OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPMENU_COMPLETENOTIFYL_13, "CSAT: CSatNotifySetUpMenu::CompleteNotifyL, Menu item length exceeded");
   422 	                            TFLOGSTRING("CSAT: CSatNotifySetUpMenu::\
       
   423 	                                CompleteNotifyL, Menu item length exceeded");
   418 	                            // Too many or long menu items
   424 	                            // Too many or long menu items
   419 	                            ret = KErrCorrupt;
   425 	                            ret = KErrCorrupt;
   420 	                            }
   426 	                            }
   421 	                        }
   427 	                        }
   422 	                    // Menu item with icon identifier
   428 	                    // Menu item with icon identifier
   423 	                    else if ( KErrNoMemory == menu.AddItemIcon( newItem, 
   429 	                    else if ( KErrNoMemory == menu.AddItemIcon( newItem, 
   424 	                        iconIdList[i] ) )
   430 	                        iconIdList[i] ) )
   425 	                        {
   431 	                        {
   426 	                        OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPMENU_COMPLETENOTIFYL_14, "CSAT: CSatNotifySetUpMenu::CompleteNotifyL, Menu item length exceeded");
   432 	                        TFLOGSTRING("CSAT: CSatNotifySetUpMenu::\
       
   433 	                            CompleteNotifyL, Menu item length exceeded");
   427 	                        // Too many or long menu items
   434 	                        // Too many or long menu items
   428 	                        ret = KErrCorrupt;
   435 	                        ret = KErrCorrupt;
   429 	                        }
   436 	                        }
   430 	                    }
   437 	                    }
   431 	                // No icon on the list    
   438 	                // No icon on the list    
   436 	                        {
   443 	                        {
   437 	                        // Menu item with item next indicator
   444 	                        // Menu item with item next indicator
   438 	                        if ( KErrNoMemory == menu.AddItem( newItem, 
   445 	                        if ( KErrNoMemory == menu.AddItem( newItem, 
   439 	                            itemNextIndicator[i] ) )
   446 	                            itemNextIndicator[i] ) )
   440 	                            {
   447 	                            {
   441 	                            OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPMENU_COMPLETENOTIFYL_15, "CSAT: CSatNotifySetUpMenu::CompleteNotifyL, Menu item length exceeded");
   448 	                            TFLOGSTRING("CSAT: CSatNotifySetUpMenu::\
       
   449 	                                CompleteNotifyL, Menu item length exceeded");
   442 	                            // Too many or long menu items
   450 	                            // Too many or long menu items
   443 	                            ret = KErrCorrupt;
   451 	                            ret = KErrCorrupt;
   444 	                            }
   452 	                            }
   445 	                        }
   453 	                        }
   446 	                    // Menu item
   454 	                    // Menu item
   447 	                    else 
   455 	                    else 
   448 	                        {
   456 	                        {
   449 	                        TInt retAdd = menu.AddItem( newItem );
   457 	                        TInt retAdd = menu.AddItem( newItem );
   450 	                        if ( KErrNoMemory == retAdd )
   458 	                        if ( KErrNoMemory == retAdd )
   451 	                            {
   459 	                            {
   452 	                            OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPMENU_COMPLETENOTIFYL_16, "CSAT: CSatNotifySetUpMenu::CompleteNotifyL, Menu item length exceeded");
   460 	                            TFLOGSTRING("CSAT: CSatNotifySetUpMenu::\
       
   461 	                                CompleteNotifyL, Menu item length exceeded");
   453 	                            // Too many or long menu items
   462 	                            // Too many or long menu items
   454 	                            // If there is not enough space left in the buffer used 
   463 	                            // If there is not enough space left in the buffer used 
   455 	                            // by the menu KErrNoMemory is returned.
   464 	                            // by the menu KErrNoMemory is returned.
   456 	                            ret = KErrCorrupt;
   465 	                            ret = KErrCorrupt;
   457 	                            // Send terminal response
   466 	                            // Send terminal response
   476         	{
   485         	{
   477         	ret = aErrorCode;
   486         	ret = aErrorCode;
   478         	}
   487         	}
   479         
   488         
   480 		// Complete to the client side
   489 		// Complete to the client side
   481 		OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPMENU_COMPLETENOTIFYL_17, "CSAT: Completing CSatNotifySetUpMenu: error %d",aErrorCode );
   490 		TFLOGSTRING2("CSAT: Completing CSatNotifySetUpMenu: error %d",
       
   491 			aErrorCode );
   482 		iNotificationsTsy->iSatTsy->ReqCompleted( reqHandle, ret );
   492 		iNotificationsTsy->iSatTsy->ReqCompleted( reqHandle, ret );
   483 		} 
   493 		} 
   484     else 
   494     else 
   485         {
   495         {
   486         OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPMENU_COMPLETENOTIFYL_18, "CSAT: CSatNotifySetUpMenu::CompleteNotifyL, Request not ongoing");
   496         TFLOGSTRING("CSAT: CSatNotifySetUpMenu::CompleteNotifyL, \
       
   497             Request not ongoing");
   487 		TBuf16<1>additionalInfo;
   498 		TBuf16<1>additionalInfo;
   488         additionalInfo.Append ( RSat::KNoSpecificMeProblem );
   499         additionalInfo.Append ( RSat::KNoSpecificMeProblem );
   489 		CreateTerminalRespL( pCmdNumber,                         
   500 		CreateTerminalRespL( pCmdNumber,                         
   490 			RSat::KMeUnableToProcessCmd, additionalInfo );		
   501 			RSat::KMeUnableToProcessCmd, additionalInfo );		
   491         }
   502         }
   500 TInt CSatNotifySetUpMenu::TerminalResponseL
   511 TInt CSatNotifySetUpMenu::TerminalResponseL
   501         ( 
   512         ( 
   502         TDes8* aRsp
   513         TDes8* aRsp
   503         )
   514         )
   504     {
   515     {
   505     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPMENU_TERMINALRESPONSEL_1, "CSAT: CSatNotifySetUpMenu::TerminalResponseL");
   516     TFLOGSTRING("CSAT: CSatNotifySetUpMenu::TerminalResponseL");
   506 
   517 
   507     TInt ret( KErrNone );
   518     TInt ret( KErrNone );
   508     TBuf16<1> additionalInfo;
   519     TBuf16<1> additionalInfo;
   509     RSat::TSetUpMenuRspV1Pckg* aRspPckg = 
   520     RSat::TSetUpMenuRspV1Pckg* aRspPckg = 
   510             reinterpret_cast<RSat::TSetUpMenuRspV1Pckg*> ( aRsp );
   521             reinterpret_cast<RSat::TSetUpMenuRspV1Pckg*> ( aRsp );
   539             }
   550             }
   540         }
   551         }
   541         
   552         
   542     if( RSat::KSuccess == rspV1.iGeneralResult && iItemsNextIndicatorRemoved )
   553     if( RSat::KSuccess == rspV1.iGeneralResult && iItemsNextIndicatorRemoved )
   543 		{
   554 		{
   544 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPMENU_TERMINALRESPONSEL_2, "CSatNotifySetUpMenu::TerminalResponseL, iItemsNextIndicatorRemoved");
   555 		TFLOGSTRING("CSatNotifySetUpMenu::TerminalResponseL, \
       
   556 			iItemsNextIndicatorRemoved");
   545 		rspV1.iGeneralResult = RSat::KPartialComprehension;
   557 		rspV1.iGeneralResult = RSat::KPartialComprehension;
   546 		}
   558 		}
   547 		
   559 		
   548     iItemsNextIndicatorRemoved = EFalse;
   560     iItemsNextIndicatorRemoved = EFalse;
   549 
   561 
   564         TUint8 aPCmdNumber,         
   576         TUint8 aPCmdNumber,         
   565         TUint8 aGeneralResult,     
   577         TUint8 aGeneralResult,     
   566         const TDesC16& aAdditionalInfo		
   578         const TDesC16& aAdditionalInfo		
   567 		)
   579 		)
   568 	{
   580 	{
   569 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPMENU_CREATETERMINALRESPL_1, "CSAT: CSatNotifySetUpMenu::CreateTerminalRespL");
   581 	TFLOGSTRING("CSAT: CSatNotifySetUpMenu::CreateTerminalRespL");	
   570     // Create and append response data
   582     // Create and append response data
   571     TTlv tlvSpecificData;
   583     TTlv tlvSpecificData;
   572     // Create General Result TLV here
   584     // Create General Result TLV here
   573     tlvSpecificData.AddTag( KTlvResultTag );
   585     tlvSpecificData.AddTag( KTlvResultTag );
   574     // General result
   586     // General result