diff -r 000000000000 -r 5e5d6b214f4f uiservicetab/vimpstcmdprocess/tsrc/vimpstcmdprocess_utest/data/branch_coverage/indexD24.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/uiservicetab/vimpstcmdprocess/tsrc/vimpstcmdprocess_utest/data/branch_coverage/indexD24.html Tue Feb 02 10:12:18 2010 +0200 @@ -0,0 +1,187 @@ + + +CTC++ Coverage Report + + + + + + + + +CTC++ Coverage Report - +Execution Profile +   #24/43

+Directory Summary | Files Summary | Functions Summary | Execution Profile
+To files: First | Previous | Next | Last | Index | No Index


+File: \meco_domain\conversations\uiservicetab\vimpstcmdprocess\src\cvimpstcmdblockcontact.cpp
+Instrumentation mode: function-decision
+TER: 79 % ( 15/ 19)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Start/ End/    
True False - Line Source

  1 /*
  2 * ===========================================================================
  3 *  Name        : cvimpstcmdblockcontact.cpp
  4 *  Part of     : IMUiServiceTab/vimpstcmdprocess
  5 *  Description : 
  6 *  Version     : %version: 10 %
  7 *
  8 *  Copyright © 2008 Nokia.  All rights reserved.
  9 *  This material, including documentation and any related computer
  10 *  programs, is protected by copyright controlled by Nokia.  All
  11 *  rights are reserved.  Copying, including reproducing, storing,
  12 *  adapting or translating, any or all of this material requires the
  13 *  prior written consent of Nokia.  This material also contains
  14 *  confidential information which may not be disclosed to others
  15 *  without the prior written consent of Nokia.
  16 * ============================================================================
  17 */
  18 
  19 // INCLUDE FILES
  20 #include "cvimpstcmdblockcontact.h"
  21 
  22 #include "vimpstcmd.hrh"
  23 #include "mvimpstcmdobserver.h"
  24 #include "vimpstdebugprint.h" 
  25 
  26 #include <e32def.h>
  27 #include "mvimpstengine.h"
  28 #include "cvimpststoragemanagerfactory.h"
  29 #include "mvimpststorageserviceview.h"
  30 
  31 #include "mvimpstenginesubservice.h"
  32 #include "mvimpstenginepresencesubservice.h"
  33 #include "tvimpstconsts.h"
  34 #include "MVIMPSTProcessArray.h"
  35 // Constants
  36 
  37 // --------------------------------------------------------------------------
  38 // CVIMPSTCmdBlockContact::CVIMPSTCmdBlockContact
  39 // --------------------------------------------------------------------------
  40 //
 
  41 CVIMPSTCmdBlockContact::CVIMPSTCmdBlockContact( 
  42         const TInt aCommandId , const TDesC& aContactId,
  43         MVIMPSTProcessArray& aArrayProcess,
  44         MVIMPSTEngine& aEngine) :            
  45             iCommandId( aCommandId ),
  46             iContactId( aContactId ),
  47             iProcessArray( aArrayProcess ),
  48             iEngine(aEngine)
  49     {
  50     }
  51 
  52 // --------------------------------------------------------------------------
  53 // CVIMPSTCmdBlockContact::~CVIMPSTCmdBlockContact
  54 // --------------------------------------------------------------------------
  55 //
 
  56 CVIMPSTCmdBlockContact::~CVIMPSTCmdBlockContact()
  57     {    
  58     
  59     }
  60 
  61 // --------------------------------------------------------------------------
  62 // CVIMPSTCmdBlockContact::NewL
  63 // --------------------------------------------------------------------------
  64 //
 
  65 CVIMPSTCmdBlockContact* CVIMPSTCmdBlockContact::NewL( 
  66         const TInt aCommandId, const TDesC& aContactId,
  67         MVIMPSTProcessArray& aArrayProcess,
  68         MVIMPSTEngine& aEngine)
  69     {
  70     CVIMPSTCmdBlockContact* self = new (ELeave ) CVIMPSTCmdBlockContact( aCommandId ,aContactId, aArrayProcess ,aEngine);
  71     self->ConstructL(); //use contsurctL if necessary
   72     return self;
  73     }
  74 // --------------------------------------------------------------------------
  75 // CVIMPSTCmdBlockContact::ConstructL
  76 // --------------------------------------------------------------------------
  77 //
 
  78 void CVIMPSTCmdBlockContact::ConstructL()
  79     {    
  80     iError = KErrNotFound;
  81     }
  82 
  83 // --------------------------------------------------------------------------
  84 // CVIMPSTCmdBlockContact::ExecuteLD
  85 // --------------------------------------------------------------------------
  86 //
 
  87 void CVIMPSTCmdBlockContact::ExecuteLD()
  88     {
  89       CHAT_DP_FUNC_ENTER("CVIMPSTCmdBlockContact::ExecuteLD");
  90     //push to the cleanupstack
  91     CleanupStack::PushL( this );       
  92     iError = KErrGeneral;
- 93     if(iContactId.Length())
  94         {
  95         //Get Presence SubService           
  96         MVIMPSTEngineSubService* subService =          
  97         (iEngine.SubService(TVIMPSTEnums::EPresence));
- 98         if (subService && iEngine.IsBlockSupportedL())
  99             {
  100             MVIMPSTEnginePresenceSubService& presence = 
  101                 MVIMPSTEnginePresenceSubService::Cast (*subService);
  102             iError = presence.AddToBlockListL(iContactId);
  103             CHAT_DP( D_CHAT_LIT(" -> After iError: %d" ), iError);
  104             }
  105         }
  106     CHAT_DP_FUNC_ENTER("CVIMPSTCmdBlockContact:: CommandFinished");
- 107     if( iError == KErrNone )
  108         {
  109         iProcessArray.RemoveFromUnknonOrInvitationListL( iContactId ,ETrue );
  110         }
- 111     if(iObserver)
  112        {
  113        iObserver->CommandFinishedL(*this);
  114        }
  115    CHAT_DP_FUNC_ENTER("CVIMPSTCmdBlockContact:: CommandFinished");   
  116    CleanupStack::PopAndDestroy();   
  117    CHAT_DP_FUNC_DONE("CVIMPSTCmdBlockContact::ExecuteLD");   
  118     }
  119 
  120 
  121 // --------------------------------------------------------------------------
  122 // CVIMPSTCmdBlockContact::AddObserver
  123 // --------------------------------------------------------------------------
  124 //
 
  125 void CVIMPSTCmdBlockContact::AddObserver( MVIMPSTCmdObserver& aObserver )
  126     {
  127     // store the observer to notify the command completion
  128     iObserver = &aObserver;
  129     }
  130 
  131 
  132 // --------------------------------------------------------------------------
  133 // CVIMPSTCmdBlockContact::CommandId
  134 // --------------------------------------------------------------------------
  135 //
 
  136 TInt CVIMPSTCmdBlockContact::CommandId() const
  137    {
   138    return iCommandId;   
  139    }
  140 
  141 // --------------------------------------------------------------------------
  142 // CVIMPSTCmdBlockContact::Result
  143 // --------------------------------------------------------------------------
  144 //
 
  145 TInt CVIMPSTCmdBlockContact::Result() const
  146    {
  147    //return valid data regd the command operation
   148    return iError;
  149    }
  150 
  151 // End of File
***TER 79% (15/19) of SOURCE FILE cvimpstcmdblockcontact.cpp

+Directory Summary | Files Summary | Functions Summary | Execution Profile
+To files: First | Previous | Next | Last | Top | Index | No Index


+