uiservicetab/vimpstcmdprocess/src/cvimpstcmdeditcontact.cpp
changeset 0 5e5d6b214f4f
child 9 9fdee5e1da30
equal deleted inserted replaced
-1:000000000000 0:5e5d6b214f4f
       
     1 /*
       
     2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Edit Contact for local store and server store
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDE FILES
       
    20 #include "cvimpstcmdeditcontact.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 "mvimpstenginecontactmgmtextention.h"
       
    29 #include "mvimpstengineextentionfeatures.h"
       
    30 
       
    31 #include "cvimpststoragemanagerfactory.h"
       
    32 #include "mvimpststorageserviceview.h"
       
    33 
       
    34 // Constants
       
    35 
       
    36 // --------------------------------------------------------------------------
       
    37 // CVIMPSTCmdEditContact::CVIMPSTCmdEditContact
       
    38 // --------------------------------------------------------------------------
       
    39 //
       
    40 CVIMPSTCmdEditContact::CVIMPSTCmdEditContact( 
       
    41         const TInt aCommandId ,MVPbkContactLink* aContactLink,
       
    42         MVIMPSTEngine& aEngine) :            
       
    43             iCommandId( aCommandId ),
       
    44             iContactLink( aContactLink ),
       
    45             iEngine(aEngine)
       
    46     {
       
    47     }
       
    48 
       
    49 // --------------------------------------------------------------------------
       
    50 // CVIMPSTCmdEditContact::~CVIMPSTCmdEditContact
       
    51 // --------------------------------------------------------------------------
       
    52 //
       
    53 CVIMPSTCmdEditContact::~CVIMPSTCmdEditContact()
       
    54     {    
       
    55     
       
    56     }
       
    57 
       
    58 // --------------------------------------------------------------------------
       
    59 // CVIMPSTCmdEditContact::NewL
       
    60 // --------------------------------------------------------------------------
       
    61 //
       
    62 CVIMPSTCmdEditContact* CVIMPSTCmdEditContact::NewL( 
       
    63         const TInt aCommandId,MVPbkContactLink* aContactLink,
       
    64         MVIMPSTEngine& aEngine)
       
    65     {
       
    66     CVIMPSTCmdEditContact* self = new (ELeave ) CVIMPSTCmdEditContact( aCommandId ,aContactLink, aEngine);
       
    67     self->ConstructL(); //use contsurctL if necessary
       
    68     return self;
       
    69     }
       
    70 // --------------------------------------------------------------------------
       
    71 // CVIMPSTCmdEditContact::ConstructL
       
    72 // --------------------------------------------------------------------------
       
    73 //
       
    74 void CVIMPSTCmdEditContact::ConstructL()
       
    75     {    
       
    76     
       
    77     }
       
    78 
       
    79 // --------------------------------------------------------------------------
       
    80 // CVIMPSTCmdEditContact::ExecuteLD
       
    81 // --------------------------------------------------------------------------
       
    82 //
       
    83 void CVIMPSTCmdEditContact::ExecuteLD()
       
    84     {
       
    85    	CHAT_DP_FUNC_ENTER("CVIMPSTEnableServiceCmd::ExecuteLD");
       
    86     //push to the cleanupstack
       
    87     CleanupStack::PushL( this );   
       
    88 /*	
       
    89 	MVIMPSTEngineExtentionFeatures* feature = iEngine.ExtentionFeatures(TVIMPSTEnums::EContactManagement);
       
    90 	if (feature)	
       
    91 		{		
       
    92 	    // to be implimented for serverstore editcontact
       
    93 		iError = KErrNone;
       
    94 		}	  	
       
    95    	
       
    96 	MVIMPSTStorageServiceView* storage = CVIMPSTStorageManagerFactory::ContactListInterfaceL(iEngine.ServiceId()) ;
       
    97 	if(storage)
       
    98 		{
       
    99 		storage->EditContactL(*iContactLink);	
       
   100 		}
       
   101 			
       
   102     CHAT_DP_FUNC_ENTER("CVIMPSTEnableServiceCmd:: CommandFinished");
       
   103 
       
   104     if(iObserver)
       
   105 	    {
       
   106 	    iObserver->CommandFinishedL(*this);
       
   107 	    }
       
   108 	CHAT_DP_FUNC_ENTER("CVIMPSTEnableServiceCmd:: CommandFinished");
       
   109 	*/	
       
   110 	CleanupStack::PopAndDestroy();	
       
   111 	CHAT_DP_FUNC_DONE("CVIMPSTEnableServiceCmd::ExecuteLD");	
       
   112     }
       
   113 
       
   114 
       
   115 // --------------------------------------------------------------------------
       
   116 // CVIMPSTCmdEditContact::AddObserver
       
   117 // --------------------------------------------------------------------------
       
   118 //
       
   119 void CVIMPSTCmdEditContact::AddObserver( MVIMPSTCmdObserver& aObserver )
       
   120     {
       
   121     // store the observer to notify the command completion
       
   122     iObserver = &aObserver;
       
   123     }
       
   124 
       
   125 
       
   126 // --------------------------------------------------------------------------
       
   127 // CVIMPSTCmdEditContact::CommandId
       
   128 // --------------------------------------------------------------------------
       
   129 //
       
   130 TInt CVIMPSTCmdEditContact::CommandId() const
       
   131 	{
       
   132 	return iCommandId;	
       
   133 	}
       
   134 
       
   135 // --------------------------------------------------------------------------
       
   136 // CVIMPSTCmdEditContact::Result
       
   137 // --------------------------------------------------------------------------
       
   138 //
       
   139 TInt CVIMPSTCmdEditContact::Result() const
       
   140 	{
       
   141 	//return valid data regd the command operation
       
   142 	return iError;
       
   143 	}
       
   144 
       
   145 // End of File