uiservicetab/vimpstcmdprocess/src/cvimpstcmdunblockcontact.cpp
branchRCL_3
changeset 9 9fdee5e1da30
parent 0 5e5d6b214f4f
equal deleted inserted replaced
8:796276a1bdcc 9:9fdee5e1da30
    18 // INCLUDE FILES
    18 // INCLUDE FILES
    19 #include "cvimpstcmdunblockcontact.h"
    19 #include "cvimpstcmdunblockcontact.h"
    20 
    20 
    21 #include "vimpstcmd.hrh"
    21 #include "vimpstcmd.hrh"
    22 #include "mvimpstcmdobserver.h"
    22 #include "mvimpstcmdobserver.h"
    23 #include "vimpstdebugprint.h" 
    23 
       
    24 #include "uiservicetabtracer.h"
    24 
    25 
    25 #include <e32def.h>
    26 #include <e32def.h>
    26 #include "mvimpstengine.h"
    27 #include "mvimpstengine.h"
    27 #include "cvimpststoragemanagerfactory.h"
    28 #include "cvimpststoragemanagerfactory.h"
    28 #include "mvimpststorageserviceview.h"
    29 #include "mvimpststorageserviceview.h"
    77 // CVIMPSTCmdUnBlockContact::ExecuteLD
    78 // CVIMPSTCmdUnBlockContact::ExecuteLD
    78 // --------------------------------------------------------------------------
    79 // --------------------------------------------------------------------------
    79 //
    80 //
    80 void CVIMPSTCmdUnBlockContact::ExecuteLD()
    81 void CVIMPSTCmdUnBlockContact::ExecuteLD()
    81     {
    82     {
    82     CHAT_DP_FUNC_ENTER("CVIMPSTCmdUnBlockContact::ExecuteLD");
    83    
       
    84     TRACER_AUTO;
    83     //push to the cleanupstack
    85     //push to the cleanupstack
    84     CleanupStack::PushL( this );       
    86     CleanupStack::PushL( this );       
    85     if(iContactId.Length())
    87     if(iContactId.Length())
    86         {
    88         {
    87         //Get Presence SubService           
    89         //Get Presence SubService           
    92             MVIMPSTEnginePresenceSubService& presence = 
    94             MVIMPSTEnginePresenceSubService& presence = 
    93             MVIMPSTEnginePresenceSubService::Cast (*subService);
    95             MVIMPSTEnginePresenceSubService::Cast (*subService);
    94             HBufC* userId = HBufC::NewLC(KPropertyMaxLength); //  2 onto cleanup stack
    96             HBufC* userId = HBufC::NewLC(KPropertyMaxLength); //  2 onto cleanup stack
    95             TPtr userIdPtr = userId->Des();
    97             TPtr userIdPtr = userId->Des();
    96             userIdPtr = iContactId;
    98             userIdPtr = iContactId;
    97           
    99             TRACE("userId: %s", &userIdPtr);            
    98             CHAT_DP( D_CHAT_LIT(" -> userId: %s" ), &userIdPtr);
       
    99             iError = presence.RemoveFromBlockListL(*userId);
   100             iError = presence.RemoveFromBlockListL(*userId);
   100             CHAT_DP( D_CHAT_LIT(" -> iError: %d" ), iError);
   101             TRACE("iError: %d", iError);           
   101             CleanupStack::PopAndDestroy(userId);//2
   102             CleanupStack::PopAndDestroy(userId);//2
   102           
   103           
   103             }
   104             }
   104         }
   105         }
   105 
   106    
   106     CHAT_DP_FUNC_ENTER("CVIMPSTCmdUnBlockContact:: CommandFinished");
       
   107 
   107 
   108     if(iObserver)
   108     if(iObserver)
   109         {
   109         {
   110         iObserver->CommandFinishedL(*this);
   110         iObserver->CommandFinishedL(*this);
   111         }
   111         }   
   112     CHAT_DP_FUNC_ENTER("CVIMPSTCmdUnBlockContact:: CommandFinished"); 
       
   113     CleanupStack::PopAndDestroy();  
   112     CleanupStack::PopAndDestroy();  
   114     CHAT_DP_FUNC_DONE("CVIMPSTCmdUnBlockContact::ExecuteLD"); 
   113   
   115     }
   114     }
   116 
   115 
   117 
   116 
   118 // --------------------------------------------------------------------------
   117 // --------------------------------------------------------------------------
   119 // CVIMPSTCmdUnBlockContact::AddObserver
   118 // CVIMPSTCmdUnBlockContact::AddObserver