uiservicetab/vimpstcmdprocess/src/cvimpstcmdblockcontact.cpp
branchRCL_3
changeset 14 9fdee5e1da30
parent 0 5e5d6b214f4f
equal deleted inserted replaced
13:796276a1bdcc 14:9fdee5e1da30
    16 // INCLUDE FILES
    16 // INCLUDE FILES
    17 #include "cvimpstcmdblockcontact.h"
    17 #include "cvimpstcmdblockcontact.h"
    18 
    18 
    19 #include "vimpstcmd.hrh"
    19 #include "vimpstcmd.hrh"
    20 #include "mvimpstcmdobserver.h"
    20 #include "mvimpstcmdobserver.h"
    21 #include "vimpstdebugprint.h" 
    21 
       
    22 #include "uiservicetabtracer.h"
    22 
    23 
    23 #include <e32def.h>
    24 #include <e32def.h>
    24 #include "mvimpstengine.h"
    25 #include "mvimpstengine.h"
    25 #include "cvimpststoragemanagerfactory.h"
    26 #include "cvimpststoragemanagerfactory.h"
    26 #include "mvimpststorageserviceview.h"
    27 #include "mvimpststorageserviceview.h"
    81 // CVIMPSTCmdBlockContact::ExecuteLD
    82 // CVIMPSTCmdBlockContact::ExecuteLD
    82 // --------------------------------------------------------------------------
    83 // --------------------------------------------------------------------------
    83 //
    84 //
    84 void CVIMPSTCmdBlockContact::ExecuteLD()
    85 void CVIMPSTCmdBlockContact::ExecuteLD()
    85     {
    86     {
    86    	CHAT_DP_FUNC_ENTER("CVIMPSTCmdBlockContact::ExecuteLD");
    87    	TRACER_AUTO;
    87     //push to the cleanupstack
    88     //push to the cleanupstack
    88     CleanupStack::PushL( this );       
    89     CleanupStack::PushL( this );       
    89     iError = KErrGeneral;
    90     iError = KErrGeneral;
    90     if(iContactId.Length())
    91     if(iContactId.Length())
    91         {
    92         {
    94         (iEngine.SubService(TVIMPSTEnums::EPresence));
    95         (iEngine.SubService(TVIMPSTEnums::EPresence));
    95         if (subService && iEngine.IsBlockSupportedL())
    96         if (subService && iEngine.IsBlockSupportedL())
    96             {
    97             {
    97             MVIMPSTEnginePresenceSubService& presence = 
    98             MVIMPSTEnginePresenceSubService& presence = 
    98                 MVIMPSTEnginePresenceSubService::Cast (*subService);
    99                 MVIMPSTEnginePresenceSubService::Cast (*subService);
    99             iError = presence.AddToBlockListL(iContactId);
   100             iError = presence.AddToBlockListL(iContactId);           
   100             CHAT_DP( D_CHAT_LIT(" -> After iError: %d" ), iError);
   101             TRACE("iError: %d", iError);
   101             }
   102             }
   102         }
   103         }
   103     CHAT_DP_FUNC_ENTER("CVIMPSTCmdBlockContact:: CommandFinished");
   104    
   104     if( iError == KErrNone )
   105     if( iError == KErrNone )
   105         {
   106         {
   106         iProcessArray.RemoveFromUnknonOrInvitationListL( iContactId ,ETrue );
   107         iProcessArray.RemoveFromUnknonOrInvitationListL( iContactId ,ETrue );
   107         }
   108         }
   108     if(iObserver)
   109     if(iObserver)
   109 	    {
   110 	    {
   110 	    iObserver->CommandFinishedL(*this);
   111 	    iObserver->CommandFinishedL(*this);
   111 	    }
   112 	    }
   112 	CHAT_DP_FUNC_ENTER("CVIMPSTCmdBlockContact:: CommandFinished");	
       
   113 	CleanupStack::PopAndDestroy();	
   113 	CleanupStack::PopAndDestroy();	
   114 	CHAT_DP_FUNC_DONE("CVIMPSTCmdBlockContact::ExecuteLD");	
   114 	
   115     }
   115     }
   116 
   116 
   117 
   117 
   118 // --------------------------------------------------------------------------
   118 // --------------------------------------------------------------------------
   119 // CVIMPSTCmdBlockContact::AddObserver
   119 // CVIMPSTCmdBlockContact::AddObserver