convergedconnectionhandler/cchserver/src/cchnotehandler.cpp
branchRCL_3
changeset 12 876a3df1f464
parent 10 ed1e38b404e5
equal deleted inserted replaced
11:6134b5029079 12:876a3df1f464
     1 /*
     1 /*
     2 * Copyright (c) 2008-2008 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
   162                 iCchCenRep->Set( 
   162                 iCchCenRep->Set( 
   163                     KCCHGprsRoamingCostWarningShown, 
   163                     KCCHGprsRoamingCostWarningShown, 
   164                     ECCHGprsRoamingCostWarningAlreadyShown );
   164                     ECCHGprsRoamingCostWarningAlreadyShown );
   165                 }
   165                 }
   166             }
   166             }
       
   167             break;
   167         default:
   168         default:
   168             break;
   169             break;
   169         }
   170         }
   170         
   171         
   171     // delete self
   172     // delete self
   235 //    
   236 //    
   236 void CCchNoteHandler::LaunchGlobalNoteL( const TInt aResourceId, 
   237 void CCchNoteHandler::LaunchGlobalNoteL( const TInt aResourceId, 
   237         const TInt aSoftKeyConfig,
   238         const TInt aSoftKeyConfig,
   238         const TInt aSecondaryDisplayIndex )
   239         const TInt aSecondaryDisplayIndex )
   239     {
   240     {
       
   241     CCHLOGSTRING( "CCchNoteHandler::LaunchGlobalNoteL: IN" );
       
   242     
   240     // Check there is global message query is shown at the moment
   243     // Check there is global message query is shown at the moment
   241     if ( IsActive() )
   244     if ( IsActive() )
   242         {
   245         {
   243         // add the message query info to array
   246         TBool alreadyAdded( EFalse );       
   244         TGlobalMsgQueryInfo msgQueryInfo;
   247         for ( TInt i( 0 ) ; i < iMsgQueryInfoArray.Count() ; i++ )
   245         msgQueryInfo.iResourceId = aResourceId;
   248             {
   246         msgQueryInfo.iSoftkeyId = aSoftKeyConfig;
   249             if ( iMsgQueryInfoArray[ i ].iResourceId == aResourceId )
   247         msgQueryInfo.iSecondaryDisplayIndex = aSecondaryDisplayIndex;
   250                 {
   248         
   251                 alreadyAdded = ETrue;
   249         iMsgQueryInfoArray.AppendL( msgQueryInfo );
   252                 }
       
   253             }
       
   254         
       
   255         // Add to array only if note with same resource is not 
       
   256         // already in array
       
   257         if ( !alreadyAdded && ( iResourceId != aResourceId ) )
       
   258             {
       
   259             // add the message query info to array
       
   260             TGlobalMsgQueryInfo msgQueryInfo;
       
   261             msgQueryInfo.iResourceId = aResourceId;
       
   262             msgQueryInfo.iSoftkeyId = aSoftKeyConfig;
       
   263             msgQueryInfo.iSecondaryDisplayIndex = aSecondaryDisplayIndex;
       
   264         
       
   265             iMsgQueryInfoArray.AppendL( msgQueryInfo );
       
   266             }
   250         }
   267         }
   251     else
   268     else
   252         {
   269         {
   253         DoLaunchGlobalNoteL( aResourceId, aSoftKeyConfig, aSecondaryDisplayIndex );
   270         DoLaunchGlobalNoteL( aResourceId, aSoftKeyConfig, aSecondaryDisplayIndex );
   254         }
   271         }
   262             SecondaryDisplay::ECmdShowDoNotShowVoipEmergencyCallWarningQuery;
   279             SecondaryDisplay::ECmdShowDoNotShowVoipEmergencyCallWarningQuery;
   263         
   280         
   264         iMsgQueryInfoArray.AppendL( msgQueryInfo );
   281         iMsgQueryInfoArray.AppendL( msgQueryInfo );
   265         }
   282         }
   266         
   283         
       
   284     CCHLOGSTRING( "CCchNoteHandler::LaunchGlobalNoteL: OUT" );
   267     }
   285     }
   268 
   286 
   269 // -----------------------------------------------------------------------------
   287 // -----------------------------------------------------------------------------
   270 // CCchNoteHandler::DoLaunchGlobalNoteL
   288 // CCchNoteHandler::DoLaunchGlobalNoteL
   271 // 
   289 // 
   274 //    
   292 //    
   275 void CCchNoteHandler::DoLaunchGlobalNoteL( const TInt aResourceId, 
   293 void CCchNoteHandler::DoLaunchGlobalNoteL( const TInt aResourceId, 
   276         const TInt aSoftKeyConfig,
   294         const TInt aSoftKeyConfig,
   277         const TInt aSecondaryDisplayIndex )
   295         const TInt aSecondaryDisplayIndex )
   278     {
   296     {
       
   297     CCHLOGSTRING( "CCchNoteHandler::LaunchGlobalNoteL: IN" );
       
   298     
   279     iResourceId = aResourceId;
   299     iResourceId = aResourceId;
   280     HBufC* textBuffer = LoadResourceL( aResourceId );
   300     HBufC* textBuffer = LoadResourceL( aResourceId );
   281     CleanupStack::PushL( textBuffer );    
   301     CleanupStack::PushL( textBuffer );    
   282          
   302          
   283     // Set secondary display data if necessary
   303     // Set secondary display data if necessary
   298         KNullDesC, 
   318         KNullDesC, 
   299         KNullDesC ); 
   319         KNullDesC ); 
   300 
   320 
   301     CleanupStack::PopAndDestroy( textBuffer );
   321     CleanupStack::PopAndDestroy( textBuffer );
   302     SetActive();
   322     SetActive();
       
   323     
       
   324     CCHLOGSTRING( "CCchNoteHandler::LaunchGlobalNoteL: OUT" );
   303     }
   325     }
   304 
   326 
   305 // -----------------------------------------------------------------------------
   327 // -----------------------------------------------------------------------------
   306 // CCchNoteHandler::LoadResourceL
   328 // CCchNoteHandler::LoadResourceL
   307 // Loads the localized text resource from resource file
   329 // Loads the localized text resource from resource file