uiservicetab/vimpstcmdprocess/src/cvimpstcmdfactory.cpp
branchRCL_3
changeset 14 9fdee5e1da30
parent 0 5e5d6b214f4f
equal deleted inserted replaced
13:796276a1bdcc 14:9fdee5e1da30
    21 #include "cvimpstprocessarray.h"
    21 #include "cvimpstprocessarray.h"
    22 #include "cvimpstcmdcca.h"
    22 #include "cvimpstcmdcca.h"
    23 #include "cvimpstcmdlogin.h"
    23 #include "cvimpstcmdlogin.h"
    24 #include "cvimpstcmdlogout.h"
    24 #include "cvimpstcmdlogout.h"
    25 #include "cvimpstcmdcancellogin.h"
    25 #include "cvimpstcmdcancellogin.h"
       
    26 
       
    27 #include "uiservicetabtracer.h"
    26 
    28 
    27 #include "mvimpstcmdobserver.h"
    29 #include "mvimpstcmdobserver.h"
    28 #include "mvimpstengine.h"
    30 #include "mvimpstengine.h"
    29 #include "tvimpstconsts.h"
    31 #include "tvimpstconsts.h"
    30 #include "cvimpststoragemanagerfactory.h"
    32 #include "cvimpststoragemanagerfactory.h"
    61 // CVIMPSTCmdFactory::ConstructL
    63 // CVIMPSTCmdFactory::ConstructL
    62 // --------------------------------------------------------------------------
    64 // --------------------------------------------------------------------------
    63 //
    65 //
    64 void CVIMPSTCmdFactory::ConstructL()
    66 void CVIMPSTCmdFactory::ConstructL()
    65     {
    67     {
    66     
    68     TRACER_AUTO;
    67     TUint32 serviceId = iEngine.ServiceId();
    69     TUint32 serviceId = iEngine.ServiceId();
    68     
    70     
    69     //Make sure we initialise the Storage view for this service
    71     //Make sure we initialise the Storage view for this service
    70     HBufC* storeName = HBufC::NewLC( KVIMPSTUISPSMaxPropertyLength );
    72     HBufC* storeName = HBufC::NewLC( KVIMPSTUISPSMaxPropertyLength );
    71 	
    73 	
   106 // CVIMPSTCmdFactory::~CVIMPSTCmdFactory
   108 // CVIMPSTCmdFactory::~CVIMPSTCmdFactory
   107 // --------------------------------------------------------------------------
   109 // --------------------------------------------------------------------------
   108 //
   110 //
   109 CVIMPSTCmdFactory::~CVIMPSTCmdFactory()
   111 CVIMPSTCmdFactory::~CVIMPSTCmdFactory()
   110     {
   112     {
   111     
   113     TRACER_AUTO;
   112     iEngine.UnIntializeStorage();
   114     iEngine.UnIntializeStorage();
   113     iEngine.UnRegisterServiceSessionObserver(this);
   115     iEngine.UnRegisterServiceSessionObserver(this);
   114     
   116     
   115     iObservers.Reset();
   117     iObservers.Reset();
   116     iObservers.Close();
   118     iObservers.Close();
   126 // --------------------------------------------------------------------------
   128 // --------------------------------------------------------------------------
   127 //
   129 //
   128 MVIMPSTCmd* CVIMPSTCmdFactory::CreateCommandForIdL(
   130 MVIMPSTCmd* CVIMPSTCmdFactory::CreateCommandForIdL(
   129         TImCommandId aCommandId,TAny* aData /*NULL*/) 
   131         TImCommandId aCommandId,TAny* aData /*NULL*/) 
   130     {
   132     {
   131     
   133     TRACER_AUTO;
   132     MVIMPSTCmd* commd = NULL;
   134     MVIMPSTCmd* commd = NULL;
   133 	
   135 	
   134 	//Instantiate appropriate command    
   136 	//Instantiate appropriate command    
   135     switch ( aCommandId )
   137     switch ( aCommandId )
   136 	    {
   138 	    {
   253 // --------------------------------------------------------------------------
   255 // --------------------------------------------------------------------------
   254 //
   256 //
   255 void CVIMPSTCmdFactory::HandleServiceEventL
   257 void CVIMPSTCmdFactory::HandleServiceEventL
   256 	    			( TVIMPSTEnums::TVIMPSTRegistrationState aState,TInt aServiceError )
   258 	    			( TVIMPSTEnums::TVIMPSTRegistrationState aState,TInt aServiceError )
   257 	{
   259 	{
       
   260 	TRACER_AUTO;
   258 	// need not to store update complete state
   261 	// need not to store update complete state
   259 	iArrayProcess->SetLoginStateL( aState );
   262 	iArrayProcess->SetLoginStateL( aState );
   260 	for( TInt index( 0 ); index < iObservers.Count(); ++index )
   263 	for( TInt index( 0 ); index < iObservers.Count(); ++index )
   261 		{
   264 		{
   262 		iObservers[index]->HandleCommandEventL(aState,aServiceError);
   265 		iObservers[index]->HandleCommandEventL(aState,aServiceError);