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