uiservicetab/vimpstcmdprocess/inc/cvimpstcmdaddfrompbk.h
changeset 0 5e5d6b214f4f
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:  
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CVIMPSTCMDADDFROMPBK_H_
       
    20 #define CVIMPSTCMDADDFROMPBK_H_
       
    21 
       
    22 
       
    23 // INCLUDES
       
    24 #include <e32base.h>
       
    25 #include <badesca.h>
       
    26 #include "mvimpstcmd.h"
       
    27 
       
    28 // FORWARD DECLARATION
       
    29 
       
    30 class MVIMPSTEngine;
       
    31 class MVPbkStoreContact;
       
    32 
       
    33 /**
       
    34  * CVIMPSTCmdAddFromPbk command object.
       
    35  */
       
    36 NONSHARABLE_CLASS(CVIMPSTCmdAddFromPbk) : public CBase,
       
    37                                           public MVIMPSTCmd
       
    38     {
       
    39     public: // Construction and destruction
       
    40 
       
    41         /**
       
    42          * Creates a new instance of this class.
       
    43          * @param aCommandId Command id.
       
    44          * @param aStoreContact phone book contact to be added.
       
    45          * @param aEngine instance of engine.
       
    46          * @return  A new instance of this class.
       
    47          */
       
    48         static CVIMPSTCmdAddFromPbk* NewL( const TInt aCommandId ,
       
    49                                            const MVPbkStoreContact& aStoreContact,
       
    50                                            MVIMPSTEngine& aEngine );
       
    51 
       
    52         /**
       
    53          * Destructor.
       
    54          */
       
    55         ~CVIMPSTCmdAddFromPbk();
       
    56 
       
    57     public: // From mvimpstcmd
       
    58        /**
       
    59         * see mvimpstcmd
       
    60         */
       
    61         void ExecuteLD();        
       
    62        /**
       
    63         * see mvimpstcmd
       
    64         */
       
    65         void AddObserver( MVIMPSTCmdObserver& aObserver );
       
    66        /**
       
    67         * see mvimpstcmd
       
    68         */
       
    69         TInt CommandId() const;     
       
    70        /**
       
    71         * see mvimpstcmd
       
    72         */  
       
    73         TInt Result() const;
       
    74         
       
    75              
       
    76 
       
    77     private: // Implementation
       
    78     
       
    79        /**
       
    80         * symbian default constructor
       
    81         * @param aCommandId Command id.
       
    82         * @param aStoreContact phone book contact to be aded..
       
    83         * @param aEngine instance of engine.
       
    84         */
       
    85         CVIMPSTCmdAddFromPbk( const TInt aCommandId, 
       
    86                               const MVPbkStoreContact& aStoreContact, 
       
    87                               MVIMPSTEngine& aEngine );
       
    88                 
       
    89        /**
       
    90         * symbian second phase constructor
       
    91         */         
       
    92         void ConstructL();
       
    93         
       
    94         /**
       
    95          * symbian second phase constructor
       
    96          */
       
    97         void GetServiceFieldsL( CDesCArray& aArrayForServiceFields );
       
    98         
       
    99     private: // Data
       
   100         
       
   101         //Command id
       
   102         const TInt iCommandId;  
       
   103         
       
   104         //phone book store contact, not owned.
       
   105         const MVPbkStoreContact& iStoreContact;
       
   106         
       
   107         //observer - doesnt own
       
   108         MVIMPSTCmdObserver* iObserver;  
       
   109         
       
   110         //doesnt own - engine for this service
       
   111         MVIMPSTEngine& iEngine;
       
   112         
       
   113         //error code.
       
   114         TInt iError;
       
   115     };
       
   116 
       
   117 #endif /*CVIMPSTCMDADDFROMPBK_H_*/
       
   118 
       
   119 // End of File