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