diff -r 000000000000 -r 5e5d6b214f4f uiservicetab/vimpstcmdprocess/tsrc/vimpstcmdprocess_utest/data/branch_coverage/indexD29.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/uiservicetab/vimpstcmdprocess/tsrc/vimpstcmdprocess_utest/data/branch_coverage/indexD29.html Tue Feb 02 10:12:18 2010 +0200 @@ -0,0 +1,186 @@ + + +CTC++ Coverage Report + + + + + + + + +CTC++ Coverage Report - +Execution Profile +   #29/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\cvimpstcmdchangeownstatus.cpp
+Instrumentation mode: function-decision
+TER: 88 % ( 15/ 17)

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

  1 /*
  2 * ===========================================================================
  3 *  Name        : cvimpstcmdchangeownstatus.cpp
  4 *  Part of     : IMUiServiceTab/vimpstcmdprocess
  5 *  Description : 
  6 *  Version     : %version: 5.1.2 %
  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 "cvimpstcmdchangeownstatus.h"
  21 #include "mvimpstenginepresencesubservice.h"
  22 
  23 #include "vimpstcmd.hrh"
  24 #include "mvimpstcmdobserver.h"
  25 #include "vimpstdebugprint.h" 
  26 
  27 #include <e32def.h>
  28 #include "mvimpstengine.h"
  29 #include "mvimpstenginesubservice.h"
  30 
  31 // Constants
  32 
  33 // --------------------------------------------------------------------------
  34 // CVIMPSTCmdChangeOwnStatus::CVIMPSTCmdChangeOwnStatus
  35 // --------------------------------------------------------------------------
  36 //
 
  37 CVIMPSTCmdChangeOwnStatus::CVIMPSTCmdChangeOwnStatus( 
  38         const TInt aCommandId ,TStatusAndStatusText aStatus,
  39         MVIMPSTEngine& aEngine) :            
  40             iCommandId( aCommandId ),
  41             iStatus(aStatus.iStatus),
  42             iEngine(aEngine)
  43     {
  44     iStatusText.Copy(aStatus.iStatusText);
  45     }
  46 
  47 // --------------------------------------------------------------------------
  48 // CVIMPSTCmdChangeOwnStatus::~CVIMPSTCmdChangeOwnStatus
  49 // --------------------------------------------------------------------------
  50 //
 
  51 CVIMPSTCmdChangeOwnStatus::~CVIMPSTCmdChangeOwnStatus()
  52     {    
  53     
  54     }
  55 
  56 // --------------------------------------------------------------------------
  57 // CVIMPSTCmdChangeOwnStatus::NewL
  58 // --------------------------------------------------------------------------
  59 //
 
  60 CVIMPSTCmdChangeOwnStatus* CVIMPSTCmdChangeOwnStatus::NewL( 
  61         const TInt aCommandId,TStatusAndStatusText aStatus,
  62         MVIMPSTEngine& aEngine)
  63     {
  64     CVIMPSTCmdChangeOwnStatus* self = new (ELeave ) CVIMPSTCmdChangeOwnStatus( aCommandId ,aStatus, aEngine);
  65     self->ConstructL(); //use contsurctL if necessary
   66     return self;
  67     }
  68 // --------------------------------------------------------------------------
  69 // CVIMPSTCmdChangeOwnStatus::ConstructL
  70 // --------------------------------------------------------------------------
  71 //
 
  72 void CVIMPSTCmdChangeOwnStatus::ConstructL()
  73     {    
  74     iError = KErrNone;
  75     }
  76 
  77 // --------------------------------------------------------------------------
  78 // CVIMPSTCmdChangeOwnStatus::ExecuteLD
  79 // --------------------------------------------------------------------------
  80 //
 
  81 void CVIMPSTCmdChangeOwnStatus::ExecuteLD()
  82     {
  83     CHAT_DP_FUNC_ENTER("CVIMPSTCmdChangeOwnStatus::ExecuteLD");
  84     //push to the cleanupstack
  85     CleanupStack::PushL( this );   
  86    
  87    //Get Presence SubService           
  88       MVIMPSTEngineSubService* subService =          
  89                   (iEngine.SubService(TVIMPSTEnums::EPresence));
  90     
- 91     if(subService)
  92         {
  93         MVIMPSTEnginePresenceSubService& presence = 
  94               MVIMPSTEnginePresenceSubService::Cast (*subService);
  95                         
- 96           if ( iStatus == TVIMPSTEnums::EInvisible)
  97               {
  98               //Status set to Appear Offline
  99               iError = presence.PublishOwnPresenceL(iStatus, KNullDesC);
  100               }
    101           else
  102               {
  103               iError = presence.PublishOwnPresenceL(iStatus, iStatusText);
  104               }
  105           }       
  106       
  107     if(iObserver)
  108         {
  109         iObserver->CommandFinishedL(*this);
  110         }
  111         
  112    
  113     
  114    CHAT_DP_FUNC_ENTER("CVIMPSTCmdChangeOwnStatus:: CommandFinished");   
  115    CleanupStack::PopAndDestroy();   
  116    CHAT_DP_FUNC_DONE("CVIMPSTCmdChangeOwnStatus::ExecuteLD");   
  117     }
  118 
  119 
  120 // --------------------------------------------------------------------------
  121 // CVIMPSTCmdChangeOwnStatus::AddObserver
  122 // --------------------------------------------------------------------------
  123 //
 
  124 void CVIMPSTCmdChangeOwnStatus::AddObserver( MVIMPSTCmdObserver& aObserver )
  125     {
  126     // store the observer to notify the command completion
  127     iObserver = &aObserver;
  128     }
  129 
  130 
  131 // --------------------------------------------------------------------------
  132 // CVIMPSTCmdChangeOwnStatus::CommandId
  133 // --------------------------------------------------------------------------
  134 //
 
  135 TInt CVIMPSTCmdChangeOwnStatus::CommandId() const
  136    {
   137    return iCommandId;   
  138    }
  139 
  140 // --------------------------------------------------------------------------
  141 // CVIMPSTCmdChangeOwnStatus::Result
  142 // --------------------------------------------------------------------------
  143 //
 
  144 TInt CVIMPSTCmdChangeOwnStatus::Result() const
  145    {
  146    //return valid data regd the command operation
   147    return iError;
  148    }
  149 
  150 // End of File
***TER 88% (15/17) of SOURCE FILE cvimpstcmdchangeownstatus.cpp

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


+