phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/src/ccappcommlauncherplugin.cpp
changeset 0 e686773b3f54
child 3 04ab22b956c2
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 /*
       
     2 * Copyright (c) 2007-2007 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Implementation of comm launcher view plugin
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "ccappcommlauncherheaders.h"
       
    20 #include <phonebook2ece.mbg>
       
    21 #include "ccappcommlaunchersetdefault.h"
       
    22 
       
    23 
       
    24 #include <mccappengine.h>
       
    25 
       
    26 // Consts
       
    27 _LIT( KCCAppCommLauncherResourceFileName, "\\resource\\ccappcommlauncherpluginrsc.rsc" );
       
    28 const TInt KCCAppCommLauncherMaxOrderBufLength = 128;
       
    29 
       
    30 const TInt KSupportedMethodsArray[] = {
       
    31     VPbkFieldTypeSelectorFactory::EVoiceCallSelector,
       
    32     VPbkFieldTypeSelectorFactory::EVOIPCallSelector,
       
    33     VPbkFieldTypeSelectorFactory::EUniEditorSelector,
       
    34     VPbkFieldTypeSelectorFactory::EEmailEditorSelector,
       
    35     VPbkFieldTypeSelectorFactory::EInstantMessagingSelector,
       
    36     VPbkFieldTypeSelectorFactory::EURLSelector,
       
    37     VPbkFieldTypeSelectorFactory::EVideoCallSelector,
       
    38     VPbkFieldTypeSelectorFactory::EFindOnMapSelector
       
    39     };
       
    40 
       
    41 const TInt KSupportedMethodsArrayLength = sizeof( KSupportedMethodsArray ) / sizeof( TInt );
       
    42 
       
    43 // ======== MEMBER FUNCTIONS ========
       
    44 
       
    45 // ---------------------------------------------------------------------------
       
    46 // CCCAppCommLauncherPlugin::NewL
       
    47 // ---------------------------------------------------------------------------
       
    48 //
       
    49 CCCAppCommLauncherPlugin* CCCAppCommLauncherPlugin::NewL()
       
    50     {
       
    51     CCA_DP(KCommLauncherLogFile, CCA_L("->CCCAppCommLauncherPlugin::NewL()"));
       
    52     CCCAppCommLauncherPlugin* self = new ( ELeave ) CCCAppCommLauncherPlugin();
       
    53     CleanupStack::PushL( self );
       
    54     self->ConstructL();
       
    55     CleanupStack::Pop( self );
       
    56     CCA_DP(KCommLauncherLogFile, CCA_L("<-CCCAppCommLauncherPlugin::NewL()"));
       
    57     return self;
       
    58     }
       
    59 
       
    60 // ---------------------------------------------------------------------------
       
    61 // CCCAppCommLauncherPlugin::~CCCAppCommLauncherPlugin
       
    62 // ---------------------------------------------------------------------------
       
    63 //
       
    64 CCCAppCommLauncherPlugin::~CCCAppCommLauncherPlugin()
       
    65     {
       
    66     CCA_DP(KCommLauncherLogFile, CCA_L("->CCCAppCommLauncherPlugin::~CCCAppCommLauncherPlugin()"));
       
    67     iPreferredCommMethods.Close();
       
    68 
       
    69     if (AppEngine())
       
    70         {
       
    71         AppEngine()->RemoveObserver(*this);
       
    72         }
       
    73 
       
    74     delete iMenuHandler;
       
    75 
       
    76     delete iContactHandler;
       
    77     delete iSetDefault;
       
    78     delete iContactorService;
       
    79     
       
    80     if ( iWaitFinish && iWaitFinish->IsStarted() )
       
    81        {
       
    82        iWaitFinish->AsyncStop();
       
    83        }
       
    84     delete iWaitFinish;
       
    85 
       
    86     CCA_DP(KCommLauncherLogFile, CCA_L("<-CCCAppCommLauncherPlugin::~CCCAppCommLauncherPlugin()"));
       
    87     }
       
    88 
       
    89 // ---------------------------------------------------------------------------
       
    90 // CCCAppCommLauncherPlugin::CCCAppCommLauncherPlugin()
       
    91 // ---------------------------------------------------------------------------
       
    92 //
       
    93 CCCAppCommLauncherPlugin::CCCAppCommLauncherPlugin()
       
    94     {
       
    95     CCA_DP(KCommLauncherLogFile, CCA_L("CCCAppCommLauncherPlugin()"));
       
    96     }
       
    97 
       
    98 // ---------------------------------------------------------------------------
       
    99 // CCCAppCommLauncherPlugin::ConstructL
       
   100 // ---------------------------------------------------------------------------
       
   101 //
       
   102 void CCCAppCommLauncherPlugin::ConstructL()
       
   103     {
       
   104     CCA_DP(KCommLauncherLogFile, CCA_L("ConstructL()"));
       
   105     // ConstructL should be as light as possible.
       
   106     iWaitFinish = new (ELeave) CActiveSchedulerWait();
       
   107     iSetDefault = CCCAppCommLauncherLSetDefault::NewL(*this);
       
   108     }
       
   109 
       
   110 // ---------------------------------------------------------------------------
       
   111 // CCCAppCommLauncherPlugin::PreparePluginViewL
       
   112 // ---------------------------------------------------------------------------
       
   113 //
       
   114 void CCCAppCommLauncherPlugin::PreparePluginViewL(
       
   115     MCCAppPluginParameter& /*aPluginParameter*/ )
       
   116     {
       
   117     CCA_DP(KCommLauncherLogFile, CCA_L("->CCCAppCommLauncherPlugin::PreparePluginViewL()"));
       
   118 
       
   119     // This plugin has no usage for the aPluginParameter
       
   120 
       
   121     if (AppEngine())
       
   122         {
       
   123         AppEngine()->AddObserverL(*this);
       
   124         }
       
   125 
       
   126     //PERFORMANCE LOGGING: 7. Preparing plugin
       
   127     WriteToPerfLog();
       
   128 
       
   129     PrepareViewResourcesL();
       
   130     InitialisePreferredCommMethods();
       
   131 
       
   132     BaseConstructL( R_COMMLAUNCHER_VIEW );
       
   133     
       
   134     // Set default for Voice call and Message
       
   135     // Not auto setting default for now
       
   136     // iSetDefault->ExecuteAssignDefaultL();
       
   137     // iWaitFinish->Start();
       
   138 
       
   139     CCA_DP(KCommLauncherLogFile, CCA_L("<-CCCAppCommLauncherPlugin::PreparePluginViewL()"));
       
   140     }
       
   141 
       
   142 // ---------------------------------------------------------------------------
       
   143 // CCCAppCommLauncherPlugin::DoActivateL
       
   144 // ---------------------------------------------------------------------------
       
   145 //
       
   146 void CCCAppCommLauncherPlugin::DoActivateL(
       
   147     const TVwsViewId& aPrevViewId,
       
   148     TUid aCustomMessageId,
       
   149     const TDesC8& aCustomMessage )
       
   150     {
       
   151     CCA_DP(KCommLauncherLogFile, CCA_L("->CCCAppCommLauncherPlugin::DoActivateL()"));
       
   152 
       
   153     //PERFORMANCE LOGGING: 8. Activating view
       
   154     WriteToPerfLog();
       
   155 
       
   156     AppUi()->SetKeyEventFlags(
       
   157         CAknAppUiBase::EDisableSendKeyShort |
       
   158         CAknAppUiBase::EDisableSendKeyLong );
       
   159     // Forward the activation-call to base-class
       
   160     CCCAppViewPluginAknView::DoActivateL(
       
   161         aPrevViewId, aCustomMessageId, aCustomMessage );
       
   162 
       
   163     CCA_DP(KCommLauncherLogFile, CCA_L("::DoActivateL() - create iContactHandler"));
       
   164     iContactHandler = CCCAppCommLauncherContactHandler::NewL(
       
   165         *static_cast<CCCAppCommLauncherContainer*>(iContainer),
       
   166         *this);
       
   167     CCA_DP(KCommLauncherLogFile, CCA_L("::DoActivateL() - request contact data"));
       
   168 
       
   169     if (iRefetchContact)
       
   170     	{
       
   171         iContactHandler->RefetchContactL();
       
   172         iRefetchContact = EFalse;
       
   173       	}
       
   174     else
       
   175     	{
       
   176         iContactHandler->RequestContactDataL();
       
   177     	}
       
   178 
       
   179     if (!iContactorService)
       
   180         {
       
   181         iContactorService = CCAContactorService::NewL();
       
   182         }
       
   183 
       
   184     CCA_DP(KCommLauncherLogFile, CCA_L("<-CCCAppCommLauncherPlugin::DoActivateL()"));
       
   185     }
       
   186 
       
   187 // ---------------------------------------------------------------------------
       
   188 // CCCAppCommLauncherPlugin::DoDeactivate
       
   189 // ---------------------------------------------------------------------------
       
   190 //
       
   191 void CCCAppCommLauncherPlugin::DoDeactivate()
       
   192     {
       
   193     CCA_DP(KCommLauncherLogFile, CCA_L("->CCCAppCommLauncherPlugin::DoDeactivate()"));
       
   194 
       
   195     delete iContactHandler;
       
   196     iContactHandler = NULL;
       
   197 
       
   198     AppUi()->SetKeyEventFlags( 0 );
       
   199     // Forward the deactivation-call to base-class
       
   200     CCCAppViewPluginAknView::DoDeactivate();
       
   201 
       
   202     // if plugin is showing notifications, this is good place to disable those
       
   203     // until ActivatePluginViewL is called again
       
   204 
       
   205     CCA_DP(KCommLauncherLogFile, CCA_L("<-CCCAppCommLauncherPlugin::DoDeactivate()"));
       
   206     }
       
   207 
       
   208 // ---------------------------------------------------------------------------
       
   209 // CCCAppCommLauncherPlugin::InitialisePreferredCommMethods
       
   210 // ---------------------------------------------------------------------------
       
   211 //
       
   212 void CCCAppCommLauncherPlugin::InitialisePreferredCommMethods()
       
   213     {
       
   214     CCA_DP(KCommLauncherLogFile, CCA_L("->CCCAppCommLauncherPlugin::InitialisePreferredCommMethods()"));
       
   215 
       
   216     TRAPD( err, LoadPreferredCommMethodsL() );
       
   217     if ( err )
       
   218         {// something went wrong with loading from cenrep,
       
   219         //  use the default order
       
   220 #ifdef _DEBUG
       
   221         CCA_DP(KCommLauncherLogFile, CCA_L("::InitialisePreferredCommMethods - Comm method variation error."));
       
   222         CCA_DP(KCommLauncherLogFile, CCA_L("::InitialisePreferredCommMethods - err: %d"), err );
       
   223         CEikonEnv::Static()->InfoMsg(_L("Comm method variation error. See logs."));
       
   224 #endif//_DEBUG
       
   225         iPreferredCommMethods.Reset();
       
   226 
       
   227         for ( TInt idx = 0; idx < KSupportedMethodsArrayLength; idx++ )
       
   228             {
       
   229             iPreferredCommMethods.Append(
       
   230                 (VPbkFieldTypeSelectorFactory::TVPbkContactActionTypeSelector)
       
   231                 KSupportedMethodsArray[ idx ]);
       
   232             }
       
   233         }
       
   234     CCA_DP(KCommLauncherLogFile, CCA_L("<-CCCAppCommLauncherPlugin::InitialisePreferredCommMethods()"));
       
   235     }
       
   236 
       
   237 // ---------------------------------------------------------------------------
       
   238 // CCCAppCommLauncherPlugin::LoadPreferredCommMethodsL
       
   239 // ---------------------------------------------------------------------------
       
   240 //
       
   241 void CCCAppCommLauncherPlugin::LoadPreferredCommMethodsL()
       
   242     {
       
   243     CCA_DP(KCommLauncherLogFile, CCA_L("->CCCAppCommLauncherPlugin::LoadPreferredCommMethodsL()"));
       
   244 
       
   245     CRepository* repository = CRepository::NewLC( KCRUidCCACommLauncher );
       
   246     TBuf<KCCAppCommLauncherMaxOrderBufLength> orderBuf;
       
   247     TInt error = repository->Get( KCommunicationMethodOrder, orderBuf );
       
   248     CleanupStack::PopAndDestroy( repository );
       
   249 
       
   250     TLex orderLex( orderBuf );
       
   251     TPtrC numToken;
       
   252     TLex numLex;
       
   253     TInt commMethodType;
       
   254     const TInt bufLength = orderBuf.Length() - 1;
       
   255 
       
   256     while ( orderLex.Offset() < bufLength )
       
   257         {
       
   258         numToken.Set( orderLex.NextToken() );
       
   259         numLex.Assign( numToken );
       
   260         // if defined value is string instead of a number,
       
   261         // use the default array
       
   262         User::LeaveIfError( numLex.Val( commMethodType ));
       
   263         CCA_DP(KCommLauncherLogFile, CCA_L("::LoadPreferredCommMethodsL - found commMethodType: %d"), commMethodType );
       
   264         // if defined value is outside of the possible comm method
       
   265         // values, use the default array
       
   266         TBool knownMethod(EFalse);
       
   267         for( TInt idx = 0; idx < KSupportedMethodsArrayLength; idx++ )
       
   268             {
       
   269             if( KSupportedMethodsArray[ idx ] == commMethodType )
       
   270                 {
       
   271                 knownMethod = ETrue;
       
   272                 break;
       
   273                 }
       
   274             }
       
   275         if(!knownMethod)
       
   276             {
       
   277             CCA_DP(KCommLauncherLogFile, CCA_L("::LoadPreferredCommMethodsL - skippin unsupported method(s): %d"),
       
   278                     commMethodType );
       
   279             User::Leave( KErrArgument );
       
   280             }
       
   281 
       
   282         iPreferredCommMethods.Append(
       
   283             VPbkFieldTypeSelectorFactory::CreateActionTypeSelectorIdL(
       
   284                 commMethodType ) );
       
   285         }
       
   286 
       
   287     // if no comm methods defined, use the default array
       
   288     User::LeaveIfError( iPreferredCommMethods.Count() ? 0 : KErrNotFound );
       
   289 
       
   290     CCA_DP(KCommLauncherLogFile, CCA_L("<-CCCAppCommLauncherPlugin::LoadPreferredCommMethodsL()"));
       
   291     }
       
   292 
       
   293 // ---------------------------------------------------------------------------
       
   294 // CCCAppCommLauncherPlugin::ProvideBitmapL
       
   295 // ---------------------------------------------------------------------------
       
   296 //
       
   297 void CCCAppCommLauncherPlugin::ProvideBitmapL(
       
   298     TCCAppIconType aIconType,
       
   299     CAknIcon& aIcon )
       
   300     {
       
   301     CCA_DP(KCommLauncherLogFile, CCA_L("->CCCAppCommLauncherPlugin::ProvideBitmapL()"));
       
   302 
       
   303     if ( ECCAppTabIcon == aIconType )
       
   304         {
       
   305         CFbsBitmap* bmp = NULL;
       
   306         CFbsBitmap* bmpMask = NULL;
       
   307 
       
   308         AknsUtils::CreateIconL(
       
   309             AknsUtils::SkinInstance(),
       
   310             KAknsIIDDefault,//todo; get a proper skin
       
   311             bmp,
       
   312             bmpMask,
       
   313             KPbk2ECEIconFileName,
       
   314             EMbmPhonebook2eceQgn_prop_pb_comm_tab3,
       
   315             EMbmPhonebook2eceQgn_prop_pb_comm_tab3_mask );
       
   316 
       
   317         aIcon.SetBitmap( bmp );
       
   318         aIcon.SetMask( bmpMask );
       
   319         }
       
   320 
       
   321     CCA_DP(KCommLauncherLogFile, CCA_L("<-CCCAppCommLauncherPlugin::ProvideBitmapL()"));
       
   322     }
       
   323 
       
   324 // ---------------------------------------------------------------------------
       
   325 // CCCAppCommLauncherPlugin::CCCAppViewPluginBaseExtension
       
   326 // ---------------------------------------------------------------------------
       
   327 //
       
   328 TAny* CCCAppCommLauncherPlugin::CCCAppViewPluginBaseExtension( TUid aExtensionUid )
       
   329     {
       
   330     if ( aExtensionUid == KMCCAppViewPluginBaseExtension2Uid )
       
   331         {
       
   332         return static_cast<MCCAppViewPluginBase2*>( this );
       
   333         }
       
   334     return NULL;
       
   335     }
       
   336 
       
   337 // ---------------------------------------------------------------------------
       
   338 // CCCAppCommLauncherPlugin::DynInitMenuPaneL
       
   339 // ---------------------------------------------------------------------------
       
   340 //
       
   341 void CCCAppCommLauncherPlugin::DynInitMenuPaneL(
       
   342     TInt aResourceId,
       
   343     CEikMenuPane* aMenuPane )
       
   344     {
       
   345     EnsureMenuHandlerCreatedL();
       
   346     iMenuHandler->DynInitMenuPaneL( aResourceId, aMenuPane );
       
   347     }
       
   348 
       
   349 // ---------------------------------------------------------------------------
       
   350 // CCCAppCommLauncherPlugin::EnsureMenuHandlerCreatedL
       
   351 // ---------------------------------------------------------------------------
       
   352 //
       
   353 void CCCAppCommLauncherPlugin::EnsureMenuHandlerCreatedL()
       
   354     {
       
   355     if ( !iMenuHandler )
       
   356         {
       
   357         iMenuHandler = CCCAppCommLauncherMenuHandler::NewL( *this );
       
   358         iMenuHandler->SetContactStore( iContactHandler->ContactStore() );
       
   359         }
       
   360     }
       
   361 
       
   362 // ---------------------------------------------------------------------------
       
   363 // CCCAppCommLauncherContainer::ContactorService
       
   364 // ---------------------------------------------------------------------------
       
   365 //
       
   366 CCAContactorService* CCCAppCommLauncherPlugin::ContactorService()
       
   367     {
       
   368     return iContactorService;
       
   369     }
       
   370 
       
   371 void CCCAppCommLauncherPlugin::DefaultSettingComplete()
       
   372 	{
       
   373 	if ( iWaitFinish && iWaitFinish->IsStarted() )
       
   374 	   {
       
   375 	   iWaitFinish->AsyncStop();
       
   376 	   }
       
   377 	}
       
   378 // ---------------------------------------------------------------------------
       
   379 // CCCAppCommLauncherPlugin::IsTopContactL
       
   380 // ---------------------------------------------------------------------------
       
   381 //
       
   382 TBool CCCAppCommLauncherPlugin::IsTopContactL()
       
   383     {
       
   384     return EFalse;//todo
       
   385     }
       
   386 
       
   387 // ---------------------------------------------------------------------------
       
   388 // CCCAppCommLauncherPlugin::IsContactL
       
   389 // ---------------------------------------------------------------------------
       
   390 //
       
   391 TBool CCCAppCommLauncherPlugin::IsContactL()
       
   392     {
       
   393     return ETrue;//todo
       
   394     }
       
   395 
       
   396 // ---------------------------------------------------------------------------
       
   397 // CCCAppCommLauncherPlugin::HandleCommandL
       
   398 // ---------------------------------------------------------------------------
       
   399 //
       
   400 void CCCAppCommLauncherPlugin::HandleCommandL( TInt aCommand )
       
   401     {
       
   402     // Forward the command handling 1st to base-class.
       
   403     // The "Exit"- and "Back"-commands are handled there.
       
   404     CCCAppViewPluginAknView::HandleCommandL( aCommand );
       
   405 
       
   406     // Rest to menuhandler
       
   407     EnsureMenuHandlerCreatedL();
       
   408     iMenuHandler->HandleCommandL( aCommand );
       
   409     }
       
   410 
       
   411 // ---------------------------------------------------------------------------
       
   412 // CCCAppCommLauncherPlugin::PreferredCommMethods
       
   413 // ---------------------------------------------------------------------------
       
   414 //
       
   415 RArray<VPbkFieldTypeSelectorFactory::TVPbkContactActionTypeSelector>&
       
   416     CCCAppCommLauncherPlugin::PreferredCommMethods()
       
   417     {
       
   418     CCA_DP(KCommLauncherLogFile, CCA_L("CCCAppCommLauncherPlugin::PreferredCommMethods()"));
       
   419     return iPreferredCommMethods;
       
   420     }
       
   421 
       
   422 // ---------------------------------------------------------------------------
       
   423 // CCCAppCommLauncherPlugin::ErrorNotifierL
       
   424 // ---------------------------------------------------------------------------
       
   425 //
       
   426 void CCCAppCommLauncherPlugin::ErrorNotifierL(
       
   427     TCCAppCommLauncherPluginErrorSource aErrorSource,
       
   428     TInt aError )
       
   429     {
       
   430     // possibility to handle the error cases
       
   431     CCA_DP(KCommLauncherLogFile, CCA_L("CCCAppCommLauncherPlugin::ErrorNotifierL() called"));
       
   432     CCA_DP(KCommLauncherLogFile, CCA_L("::ErrorNotifierL aError: %d"), aError );
       
   433     CCA_DP(KCommLauncherLogFile, CCA_L("::ErrorNotifierL aErrorSource: %d"), (TInt)aErrorSource );
       
   434     }
       
   435 
       
   436 // ---------------------------------------------------------------------------
       
   437 // CCCAppCommLauncherPlugin::Container
       
   438 // ---------------------------------------------------------------------------
       
   439 //
       
   440 CCCAppCommLauncherContainer& CCCAppCommLauncherPlugin::Container()
       
   441     {
       
   442     return *static_cast<CCCAppCommLauncherContainer*>(iContainer);
       
   443     }
       
   444 
       
   445 // ---------------------------------------------------------------------------
       
   446 // CCCAppCommLauncherPlugin::ContactHandler
       
   447 // ---------------------------------------------------------------------------
       
   448 //
       
   449 CCCAppCommLauncherContactHandler& CCCAppCommLauncherPlugin::ContactHandler()
       
   450     {
       
   451     return *iContactHandler;
       
   452     }
       
   453 
       
   454 // ---------------------------------------------------------------------------
       
   455 // CCCAppCommLauncherPlugin::NewContainerL
       
   456 // ---------------------------------------------------------------------------
       
   457 //
       
   458 void CCCAppCommLauncherPlugin::NewContainerL()
       
   459     {
       
   460     iContainer = new (ELeave) CCCAppCommLauncherContainer( *this );
       
   461     }
       
   462 
       
   463 // ---------------------------------------------------------------------------
       
   464 // CCCAppCommLauncherPlugin::PluginBusy()
       
   465 // ---------------------------------------------------------------------------
       
   466 //
       
   467 TBool CCCAppCommLauncherPlugin::PluginBusy()
       
   468     {
       
   469     TBool ret = EFalse;
       
   470     
       
   471     if ( iContactorService != NULL )
       
   472        {
       
   473        ret = iContactorService->IsBusy();
       
   474        }
       
   475     return ret;
       
   476     }
       
   477 
       
   478 // ---------------------------------------------------------------------------
       
   479 // CCCAppCommLauncherPlugin::Id
       
   480 // ---------------------------------------------------------------------------
       
   481 //
       
   482 TUid CCCAppCommLauncherPlugin::Id()const
       
   483     {
       
   484     return TUid::Uid( KCCACommLauncherPluginImplmentationUid );
       
   485     }
       
   486 
       
   487 // ---------------------------------------------------------------------------
       
   488 // CCCAppCommLauncherPlugin::PrepareViewResourcesL
       
   489 // ---------------------------------------------------------------------------
       
   490 //
       
   491 void CCCAppCommLauncherPlugin::PrepareViewResourcesL()
       
   492     {
       
   493     // preparing resources for use
       
   494     TFileName fileName( KCCAppCommLauncherResourceFileName );
       
   495     BaflUtils::NearestLanguageFile( iCoeEnv->FsSession(), fileName );
       
   496     iResourceLoader.OpenL( fileName );
       
   497     }
       
   498 
       
   499 
       
   500 // ---------------------------------------------------------------------------
       
   501 // CCCAppCommLauncherPlugin::SetTitleL
       
   502 // ---------------------------------------------------------------------------
       
   503 //
       
   504 void CCCAppCommLauncherPlugin::SetTitleL( const TDesC& aTitle )
       
   505     {
       
   506     // Forward the SetTitleL-call to base-class
       
   507     CCCAppViewPluginAknView::SetTitleL( aTitle );
       
   508     }
       
   509 
       
   510 // ---------------------------------------------------------------------------
       
   511 // CCCAppCommLauncherPlugin::NotifyPluginOfContactChangeL
       
   512 // ---------------------------------------------------------------------------
       
   513 //
       
   514 void CCCAppCommLauncherPlugin::NotifyPluginOfContactEventL()
       
   515     {
       
   516     iRefetchContact = ETrue;
       
   517     }
       
   518 
       
   519 // --------------------------------------------------------------------------
       
   520 // CCCAppCommLauncherPlugin::UpdateMSKinCbaL
       
   521 // Sets CBA with empty MSK or MSK with text "Select" when contact has
       
   522 // communication methods available.
       
   523 // --------------------------------------------------------------------------
       
   524 //
       
   525 void CCCAppCommLauncherPlugin::UpdateMSKinCbaL( TBool aCommMethodsAvailable )
       
   526 {
       
   527     CEikButtonGroupContainer* cba = Cba();
       
   528 
       
   529     if ( cba )
       
   530         {
       
   531         cba->SetCommandSetL(aCommMethodsAvailable
       
   532             ? R_AVKON_SOFTKEYS_OPTIONS_BACK__SELECT
       
   533             : R_CCACOMMLAUNCHER_SOFTKEYS_OPTIONS_BACK_EMPTY);
       
   534 
       
   535         cba->DrawDeferred();
       
   536         }
       
   537 }
       
   538 
       
   539 // End of File