phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/src/CCCAppCommLauncherPbkCmd.cpp
branchRCL_3
changeset 39 a6539d1e8e43
parent 35 4ae315f230bc
child 64 c1e8ba0c2b16
equal deleted inserted replaced
35:4ae315f230bc 39:a6539d1e8e43
    50 //
    50 //
    51 CCCAppCommLauncherPbkCmd::CCCAppCommLauncherPbkCmd( CCCAppCommLauncherPlugin& aPlugin ):
    51 CCCAppCommLauncherPbkCmd::CCCAppCommLauncherPbkCmd( CCCAppCommLauncherPlugin& aPlugin ):
    52     iCommandsResourceFile( *CCoeEnv::Static() ),
    52     iCommandsResourceFile( *CCoeEnv::Static() ),
    53     iUiControlsResourceFile( *CCoeEnv::Static() ),
    53     iUiControlsResourceFile( *CCoeEnv::Static() ),
    54     iCommonUiResourceFile( *CCoeEnv::Static() ),
    54     iCommonUiResourceFile( *CCoeEnv::Static() ),
    55     iPlugin( aPlugin ),
    55     iPlugin( aPlugin )
    56     iCommandInProgress( EFalse )
       
    57     {
    56     {
    58     }
    57     }
    59 
    58 
    60 
    59 
    61 // ---------------------------------------------------------------------------
    60 // ---------------------------------------------------------------------------
    64 //
    63 //
    65 void CCCAppCommLauncherPbkCmd::ConstructL()
    64 void CCCAppCommLauncherPbkCmd::ConstructL()
    66     {
    65     {
    67     PreparePbk2ApplicationServicesL();
    66     PreparePbk2ApplicationServicesL();
    68     iCommandHandler = CPbk2CommandHandler::NewL();
    67     iCommandHandler = CPbk2CommandHandler::NewL();
       
    68     iCommandHandler->AddMenuCommandObserver( *this );
    69     }
    69     }
    70 
    70 
    71 
    71 
    72 // ---------------------------------------------------------------------------
    72 // ---------------------------------------------------------------------------
    73 // CCCAppCommLauncherPbkCmd::NewL
    73 // CCCAppCommLauncherPbkCmd::NewL
   104         {
   104         {
   105         iCommand->ResetUiControl( *this );
   105         iCommand->ResetUiControl( *this );
   106         }
   106         }
   107 
   107 
   108     delete iStoreContact;
   108     delete iStoreContact;
       
   109     if ( iCommandHandler )
       
   110         {
       
   111         iCommandHandler->RemoveMenuCommandObserver( *this );
       
   112         }
   109     delete iCommandHandler;
   113     delete iCommandHandler;
   110     delete iLinks;
   114     delete iLinks;
   111     delete iOperation;
   115     delete iOperation;
   112 
   116 
   113     // Close contact store
   117     // Close contact store
   143 // CCCAppCommLauncherMenuHandler::ExecutePbk2CmdAssignDefault
   147 // CCCAppCommLauncherMenuHandler::ExecutePbk2CmdAssignDefault
   144 // ---------------------------------------------------------------------------
   148 // ---------------------------------------------------------------------------
   145 //
   149 //
   146 void CCCAppCommLauncherPbkCmd::ExecutePbk2CmdAssignDefaultL( const TDesC8& aContact )
   150 void CCCAppCommLauncherPbkCmd::ExecutePbk2CmdAssignDefaultL( const TDesC8& aContact )
   147     {
   151     {
   148     iCommandInProgress = ETrue;
   152     TCCAppCommandState& cmdState( iPlugin.CommandState() );
   149     
   153     if ( !cmdState.IsRunning() )
   150     iPbk2CommandId = EPbk2CmdDefaultSettings;
   154         {
   151 
   155         cmdState.SetRunningAndPushCleanupL();
   152     if( iLinks )
   156         
   153         {
   157         iPbk2CommandId = EPbk2CmdDefaultSettings;
   154         delete iLinks;
   158     
   155         iLinks = NULL;
   159         if( iLinks )
   156         }
   160             {
   157 
   161             delete iLinks;
   158     iLinks = iAppServices->ContactManager().CreateLinksLC( aContact );
   162             iLinks = NULL;
   159 
   163             }
   160     if ( iLinks && iLinks->Count() > 0 )
   164     
   161         {
   165         iLinks = iAppServices->ContactManager().CreateLinksLC( aContact );
   162         // operation completes by StoreReady,
   166     
   163         //  StoreUnavailable or HandleStoreEventL
   167         if ( iLinks && iLinks->Count() > 0 )
   164         (iLinks->At( 0 )).ContactStore().OpenL( *this );
   168             {
   165         }
   169             // operation completes by StoreReady,
   166 
   170             //  StoreUnavailable or HandleStoreEventL
   167     CleanupStack::Pop( 1 ); // iLinks (deleted in destructor)
   171             (iLinks->At( 0 )).ContactStore().OpenL( *this );
       
   172             }
       
   173     
       
   174         CleanupStack::Pop( 1 ); // iLinks (deleted in destructor)
       
   175         cmdState.PopCleanup();
       
   176         }
   168     }
   177     }
   169 
   178 
   170 // ---------------------------------------------------------------------------
   179 // ---------------------------------------------------------------------------
   171 // CCCAppCommLauncherMenuHandler::ExecutePbk2CmdViewImageL
   180 // CCCAppCommLauncherMenuHandler::ExecutePbk2CmdViewImageL
   172 // ---------------------------------------------------------------------------
   181 // ---------------------------------------------------------------------------
   173 //
   182 //
   174 void CCCAppCommLauncherPbkCmd::ExecutePbk2CmdViewImageL( const TDesC8& aContact )
   183 void CCCAppCommLauncherPbkCmd::ExecutePbk2CmdViewImageL( const TDesC8& aContact )
   175     {
   184     {
   176     iCommandInProgress = ETrue;
   185     TCCAppCommandState& cmdState( iPlugin.CommandState() );
   177     
   186     if ( !cmdState.IsRunning() )
   178     iPbk2CommandId = EPbk2CmdViewImage;
   187         {
   179 
   188         cmdState.SetRunningAndPushCleanupL();
   180     if( iLinks )
   189         
   181         {
   190         iPbk2CommandId = EPbk2CmdViewImage;
   182         delete iLinks;
   191     
   183         iLinks = NULL;
   192         if( iLinks )
   184         }
   193             {
   185 
   194             delete iLinks;
   186     iLinks = iAppServices->ContactManager().CreateLinksLC( aContact );
   195             iLinks = NULL;
   187 
   196             }
   188     if ( iLinks && iLinks->Count() > 0 )
   197     
   189         {
   198         iLinks = iAppServices->ContactManager().CreateLinksLC( aContact );
   190         // operation completes by StoreReady,
   199     
   191         //  StoreUnavailable or HandleStoreEventL
   200         if ( iLinks && iLinks->Count() > 0 )
   192         (iLinks->At( 0 )).ContactStore().OpenL( *this );
   201             {
   193         }
   202             // operation completes by StoreReady,
   194 
   203             //  StoreUnavailable or HandleStoreEventL
   195     CleanupStack::Pop( 1 ); // iLinks (deleted in destructor)
   204             (iLinks->At( 0 )).ContactStore().OpenL( *this );
       
   205             }
       
   206     
       
   207         CleanupStack::Pop( 1 ); // iLinks (deleted in destructor)
       
   208         cmdState.PopCleanup();
       
   209         }
   196     }
   210     }
   197 
   211 
   198 // ---------------------------------------------------------------------------
   212 // ---------------------------------------------------------------------------
   199 // CCCAppCommLauncherMenuHandler::ExecutePbk2CmdChangeImageL
   213 // CCCAppCommLauncherMenuHandler::ExecutePbk2CmdChangeImageL
   200 // ---------------------------------------------------------------------------
   214 // ---------------------------------------------------------------------------
   201 //
   215 //
   202 void CCCAppCommLauncherPbkCmd::ExecutePbk2CmdChangeImageL( const TDesC8& aContact )
   216 void CCCAppCommLauncherPbkCmd::ExecutePbk2CmdChangeImageL( const TDesC8& aContact )
   203     {
   217     {
   204     iCommandInProgress = ETrue;
   218     TCCAppCommandState& cmdState( iPlugin.CommandState() );
   205     
   219     if ( !cmdState.IsRunning() )
   206     iPbk2CommandId = EPbk2CmdChangeImage;
   220         {
   207 
   221         cmdState.SetRunningAndPushCleanupL();
   208     if( iLinks )
   222         
   209         {
   223         iPbk2CommandId = EPbk2CmdChangeImage;
   210         delete iLinks;
   224     
   211         iLinks = NULL;
   225         if( iLinks )
   212         }
   226             {
   213 
   227             delete iLinks;
   214     iLinks = iAppServices->ContactManager().CreateLinksLC( aContact );
   228             iLinks = NULL;
   215 
   229             }
   216     if ( iLinks && iLinks->Count() > 0 )
   230     
   217         {
   231         iLinks = iAppServices->ContactManager().CreateLinksLC( aContact );
   218         // operation completes by StoreReady,
   232     
   219         //  StoreUnavailable or HandleStoreEventL
   233         if ( iLinks && iLinks->Count() > 0 )
   220         (iLinks->At( 0 )).ContactStore().OpenL( *this );
   234             {
   221         }
   235             // operation completes by StoreReady,
   222 
   236             //  StoreUnavailable or HandleStoreEventL
   223     CleanupStack::Pop( 1 ); // iLinks (deleted in destructor)
   237             (iLinks->At( 0 )).ContactStore().OpenL( *this );
       
   238             }
       
   239     
       
   240         CleanupStack::Pop( 1 ); // iLinks (deleted in destructor)
       
   241         cmdState.PopCleanup();
       
   242         }
   224     }
   243     }
   225 
   244 
   226 // ---------------------------------------------------------------------------
   245 // ---------------------------------------------------------------------------
   227 // CCCAppCommLauncherMenuHandler::ExecutePbk2CmdRemoveImageL
   246 // CCCAppCommLauncherMenuHandler::ExecutePbk2CmdRemoveImageL
   228 // ---------------------------------------------------------------------------
   247 // ---------------------------------------------------------------------------
   229 //
   248 //
   230 void CCCAppCommLauncherPbkCmd::ExecutePbk2CmdRemoveImageL( const TDesC8& aContact )
   249 void CCCAppCommLauncherPbkCmd::ExecutePbk2CmdRemoveImageL( const TDesC8& aContact )
   231     {
   250     {
   232     iCommandInProgress = ETrue;
   251     TCCAppCommandState& cmdState( iPlugin.CommandState() );
   233     
   252     if ( !cmdState.IsRunning() )
   234 	iPbk2CommandId = EPbk2CmdRemoveImage;
   253         {
   235 
   254         cmdState.SetRunningAndPushCleanupL();
   236     if( iLinks )
   255         
   237         {
   256         iPbk2CommandId = EPbk2CmdRemoveImage;
   238         delete iLinks;
   257     
   239         iLinks = NULL;
   258         if( iLinks )
   240         }
   259             {
   241 
   260             delete iLinks;
   242     iLinks = iAppServices->ContactManager().CreateLinksLC( aContact );
   261             iLinks = NULL;
   243 
   262             }
   244     if ( iLinks && iLinks->Count() > 0 )
   263     
   245         {
   264         iLinks = iAppServices->ContactManager().CreateLinksLC( aContact );
   246         // operation completes by StoreReady,
   265     
   247         //  StoreUnavailable or HandleStoreEventL
   266         if ( iLinks && iLinks->Count() > 0 )
   248         (iLinks->At( 0 )).ContactStore().OpenL( *this );
   267             {
   249         }
   268             // operation completes by StoreReady,
   250 
   269             //  StoreUnavailable or HandleStoreEventL
   251     CleanupStack::Pop( 1 ); // iLinks (deleted in destructor)
   270             (iLinks->At( 0 )).ContactStore().OpenL( *this );
       
   271             }
       
   272     
       
   273         CleanupStack::Pop( 1 ); // iLinks (deleted in destructor)
       
   274         cmdState.PopCleanup();
       
   275         }
   252     }
   276     }
   253 
   277 
   254 // ---------------------------------------------------------------------------
   278 // ---------------------------------------------------------------------------
   255 // CCCAppCommLauncherMenuHandler::ExecutePbk2CmdAddImageL
   279 // CCCAppCommLauncherMenuHandler::ExecutePbk2CmdAddImageL
   256 // ---------------------------------------------------------------------------
   280 // ---------------------------------------------------------------------------
   257 //
   281 //
   258 void CCCAppCommLauncherPbkCmd::ExecutePbk2CmdAddImageL( const TDesC8& aContact )
   282 void CCCAppCommLauncherPbkCmd::ExecutePbk2CmdAddImageL( const TDesC8& aContact )
   259     {
   283     {
   260     iCommandInProgress = ETrue;
   284     TCCAppCommandState& cmdState( iPlugin.CommandState() );
   261     
   285     if ( !cmdState.IsRunning() )
   262     iPbk2CommandId = EPbk2CmdAddImage;
   286         {
   263 
   287         cmdState.SetRunningAndPushCleanupL();
   264     if( iLinks )
   288         
   265         {
   289         iPbk2CommandId = EPbk2CmdAddImage;
   266         delete iLinks;
   290     
   267         iLinks = NULL;
   291         if( iLinks )
   268         }
   292             {
   269 
   293             delete iLinks;
   270     iLinks = iAppServices->ContactManager().CreateLinksLC( aContact );
   294             iLinks = NULL;
   271 
   295             }
   272     if ( iLinks && iLinks->Count() > 0 )
   296     
   273         {
   297         iLinks = iAppServices->ContactManager().CreateLinksLC( aContact );
   274         // operation completes by StoreReady,
   298     
   275         //  StoreUnavailable or HandleStoreEventL
   299         if ( iLinks && iLinks->Count() > 0 )
   276         (iLinks->At( 0 )).ContactStore().OpenL( *this );
   300             {
   277         }
   301             // operation completes by StoreReady,
   278 
   302             //  StoreUnavailable or HandleStoreEventL
   279     CleanupStack::Pop( 1 ); // iLinks (deleted in destructor)
   303             (iLinks->At( 0 )).ContactStore().OpenL( *this );
       
   304             }
       
   305     
       
   306         CleanupStack::Pop( 1 ); // iLinks (deleted in destructor)
       
   307         cmdState.PopCleanup();
       
   308         }
   280     }
   309     }
   281 
   310 
   282 // ---------------------------------------------------------------------------
   311 // ---------------------------------------------------------------------------
   283 // CCCAppCommLauncherMenuHandler::ExecutePbk2CmdShowOnMapL
   312 // CCCAppCommLauncherMenuHandler::ExecutePbk2CmdShowOnMapL
   284 // ---------------------------------------------------------------------------
   313 // ---------------------------------------------------------------------------
   285 //
   314 //
   286 void CCCAppCommLauncherPbkCmd::ExecutePbk2CmdShowMapL( const HBufC8* aContact,
   315 void CCCAppCommLauncherPbkCmd::ExecutePbk2CmdShowMapL( const HBufC8* aContact,
   287 		TPbk2CommandId aCommandId )
   316 		TPbk2CommandId aCommandId )
   288     {
   317     {
   289     iCommandInProgress = ETrue;
   318     TCCAppCommandState& cmdState( iPlugin.CommandState() );
   290 	
   319     if ( !cmdState.IsRunning() )
   291 	iPbk2CommandId = aCommandId;
   320         {
   292     
   321         cmdState.SetRunningAndPushCleanupL();
   293     if( iLinks )
   322         
   294         {
   323         iPbk2CommandId = aCommandId;
   295         delete iLinks;
   324         
   296         iLinks = NULL;
   325         if( iLinks )
   297         }
   326             {
   298     
   327             delete iLinks;
   299     iLinks = iAppServices->ContactManager().CreateLinksLC( *aContact );   
   328             iLinks = NULL;
   300     
   329             }
   301     if ( iLinks->Count() > 0 )
   330         
   302         {       
   331         iLinks = iAppServices->ContactManager().CreateLinksLC( *aContact );   
   303         // operation completes by StoreReady,
   332         
   304         //  StoreUnavailable or HandleStoreEventL
   333         if ( iLinks->Count() > 0 )
   305         (iLinks->At( 0 )).ContactStore().OpenL( *this );
   334             {       
   306         }
   335             // operation completes by StoreReady,
   307     
   336             //  StoreUnavailable or HandleStoreEventL
   308     CleanupStack::Pop( 1 ); // iLinks (deleted in destructor)
   337             (iLinks->At( 0 )).ContactStore().OpenL( *this );
       
   338             }
       
   339         
       
   340         CleanupStack::Pop( 1 ); // iLinks (deleted in destructor)
       
   341         cmdState.PopCleanup();
       
   342         }
   309     }
   343     }
   310 
   344 
   311 // ---------------------------------------------------------------------------
   345 // ---------------------------------------------------------------------------
   312 // CCCAppCommLauncherMenuHandler::ExecutePbk2CmdDeleteL
   346 // CCCAppCommLauncherMenuHandler::ExecutePbk2CmdDeleteL
   313 // ---------------------------------------------------------------------------
   347 // ---------------------------------------------------------------------------
   314 //
   348 //
   315 void CCCAppCommLauncherPbkCmd::ExecutePbk2CmdDeleteL( const TDesC8& aContact )
   349 void CCCAppCommLauncherPbkCmd::ExecutePbk2CmdDeleteL( const TDesC8& aContact )
   316     {
   350     {
   317     iCommandInProgress = ETrue;
   351     TCCAppCommandState& cmdState( iPlugin.CommandState() );
   318     
   352     if ( !cmdState.IsRunning() )
   319     iPbk2CommandId = EPbk2CmdDeleteMe;
   353         {
   320     
   354         cmdState.SetRunningAndPushCleanupL();
   321     if( iLinks )
   355         
   322         {
   356         iPbk2CommandId = EPbk2CmdDeleteMe;
   323         delete iLinks;
   357         
   324         iLinks = NULL;
   358         if( iLinks )
   325         }
   359             {
   326     
   360             delete iLinks;
   327     iLinks = iAppServices->ContactManager().CreateLinksLC( aContact );   
   361             iLinks = NULL;
   328     
   362             }
   329     if ( iLinks->Count() > 0 )
   363         
   330         {       
   364         iLinks = iAppServices->ContactManager().CreateLinksLC( aContact );   
   331         // operation completes by StoreReady,
   365         
   332         //  StoreUnavailable or HandleStoreEventL
   366         if ( iLinks->Count() > 0 )
   333         ( iLinks->At( 0 ) ).ContactStore().OpenL( *this );
   367             {       
   334         }
   368             // operation completes by StoreReady,
   335     
   369             //  StoreUnavailable or HandleStoreEventL
   336     CleanupStack::Pop( 1 ); // iLinks (deleted in destructor)
   370             ( iLinks->At( 0 ) ).ContactStore().OpenL( *this );
       
   371             }
       
   372         
       
   373         CleanupStack::Pop( 1 ); // iLinks (deleted in destructor)
       
   374         cmdState.PopCleanup();
       
   375         }
   337     }
   376     }
   338 
   377 
   339 // ---------------------------------------------------------------------------
   378 // ---------------------------------------------------------------------------
   340 // CCCAppCommLauncherMenuHandler::HandleError
   379 // CCCAppCommLauncherMenuHandler::HandleError
   341 // ---------------------------------------------------------------------------
   380 // ---------------------------------------------------------------------------
   342 //
   381 //
   343 void CCCAppCommLauncherPbkCmd::HandleError( TInt aError )
   382 void CCCAppCommLauncherPbkCmd::HandleError( TInt aError )
   344     {
   383     {
       
   384     iPlugin.CommandState().SetNotRunning();
       
   385     
   345     if( KErrNotSupported == aError && 
   386     if( KErrNotSupported == aError && 
   346         (TPbk2CommandId)EPbk2ExtensionShowOnMap == iPbk2CommandId )
   387         (TPbk2CommandId)EPbk2ExtensionShowOnMap == iPbk2CommandId )
   347         {
   388         {
   348         // Show maps specifix error note
   389         // Show maps specifix error note
   349         HBufC* prompt = StringLoader::LoadLC( R_QTN_CCA_ERROR_NOTE_MAPS_NOT_FOUND );
   390         HBufC* prompt = StringLoader::LoadLC( R_QTN_CCA_ERROR_NOTE_MAPS_NOT_FOUND );
   386 //
   427 //
   387 void CCCAppCommLauncherPbkCmd::StoreUnavailable(
   428 void CCCAppCommLauncherPbkCmd::StoreUnavailable(
   388     MVPbkContactStore& /*aContactStore*/,
   429     MVPbkContactStore& /*aContactStore*/,
   389     TInt /*aReason*/)
   430     TInt /*aReason*/)
   390     {
   431     {
       
   432     iPlugin.CommandState().SetNotRunning();
   391     }
   433     }
   392 
   434 
   393 // ---------------------------------------------------------------------------
   435 // ---------------------------------------------------------------------------
   394 // CCCAppCommLauncherPbkCmd::HandleStoreEventL
   436 // CCCAppCommLauncherPbkCmd::HandleStoreEventL
   395 // ---------------------------------------------------------------------------
   437 // ---------------------------------------------------------------------------
   409         MVPbkStoreContact* aContact )
   451         MVPbkStoreContact* aContact )
   410     {
   452     {
   411     delete iStoreContact;
   453     delete iStoreContact;
   412     iStoreContact = aContact;
   454     iStoreContact = aContact;
   413 
   455 
   414     if( !iCommandHandler )
       
   415         {
       
   416         TRAPD(err, iCommandHandler = CPbk2CommandHandler::NewL();)
       
   417         if( err != KErrNone )
       
   418             {
       
   419             HandleError( err );
       
   420             return;
       
   421             }
       
   422         }
       
   423 
       
   424     TRAPD(err, iCommandHandler->HandleCommandL(
   456     TRAPD(err, iCommandHandler->HandleCommandL(
   425             iPbk2CommandId, *this, NULL );)
   457             iPbk2CommandId, *this, NULL );)
   426     if( err != KErrNone )
   458     if( err != KErrNone )
   427         {
   459         {
   428         HandleError( err );
   460         HandleError( err );
   435 //
   467 //
   436 void CCCAppCommLauncherPbkCmd::VPbkSingleContactOperationFailed(
   468 void CCCAppCommLauncherPbkCmd::VPbkSingleContactOperationFailed(
   437         MVPbkContactOperationBase& /*aOperation*/,
   469         MVPbkContactOperationBase& /*aOperation*/,
   438         TInt /*aError*/ )
   470         TInt /*aError*/ )
   439     {
   471     {
   440 
   472     iPlugin.CommandState().SetNotRunning();
   441     }
   473     }
   442 
   474 
   443 // --------------------------------------------------------------------------
   475 // --------------------------------------------------------------------------
   444 // CCCAppCommLauncherPbkCmd::ParentControl
   476 // CCCAppCommLauncherPbkCmd::ParentControl
   445 // --------------------------------------------------------------------------
   477 // --------------------------------------------------------------------------
   721     if( iCommand )
   753     if( iCommand )
   722     {
   754     {
   723         /// Reset command pointer, command has completed
   755         /// Reset command pointer, command has completed
   724         iCommand->ResetUiControl(*this);
   756         iCommand->ResetUiControl(*this);
   725         iCommand = NULL;
   757         iCommand = NULL;
   726         iCommandInProgress = EFalse;
       
   727     }
   758     }
   728 }
   759 }
   729 
   760 
   730 // --------------------------------------------------------------------------
   761 // --------------------------------------------------------------------------
   731 // CCCAppCommLauncherPbkCmd::GetMenuFilteringFlagsL
   762 // CCCAppCommLauncherPbkCmd::GetMenuFilteringFlagsL
   883 {
   914 {
   884     //Do nothing, since there shouldn't be any command items in this state.
   915     //Do nothing, since there shouldn't be any command items in this state.
   885 }
   916 }
   886 
   917 
   887 // --------------------------------------------------------------------------
   918 // --------------------------------------------------------------------------
       
   919 // CCCAppCommLauncherPbkCmd::PostCommandExecutionL
       
   920 // --------------------------------------------------------------------------
       
   921 //
       
   922 void CCCAppCommLauncherPbkCmd::PostCommandExecutionL( 
       
   923         const MPbk2Command& /*aCommand*/ )
       
   924     {
       
   925     // Async Pbk2 command has been executed. The state must be set back to
       
   926     // not running.
       
   927     iPlugin.CommandState().SetNotRunning();
       
   928     }
       
   929 
       
   930 // --------------------------------------------------------------------------
   888 // CCCAppCommLauncherPbkCmd::IsPbk2CommandRunning
   931 // CCCAppCommLauncherPbkCmd::IsPbk2CommandRunning
   889 // --------------------------------------------------------------------------
   932 // --------------------------------------------------------------------------
   890 //
   933 //
   891 TBool CCCAppCommLauncherPbkCmd::IsPbk2CommandRunning()
   934 TBool CCCAppCommLauncherPbkCmd::IsPbk2CommandRunning()
   892     {
   935     {
   893     return iCommandInProgress;
   936     return iPlugin.CommandState().IsRunning();
   894     }
   937     }
   895 
   938 
   896 // --------------------------------------------------------------------------
   939 // --------------------------------------------------------------------------
   897 // CCCAppCommLauncherPbkCmd::ApplicationServices
   940 // CCCAppCommLauncherPbkCmd::ApplicationServices
   898 // --------------------------------------------------------------------------
   941 // --------------------------------------------------------------------------