uiservicetab/vimpstcmdprocess/inc/cvimpstcmdaddcontact.h
branchRCL_3
changeset 23 9a48e301e94b
parent 0 5e5d6b214f4f
equal deleted inserted replaced
22:3104fc151679 23:9a48e301e94b
       
     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 CVIMPSTCMDADDCONTACT_H
       
    20 #define CVIMPSTCMDADDCONTACT_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32base.h>
       
    24 #include "mvimpstcmd.h"
       
    25 
       
    26 // FORWARD DECLARATION
       
    27 
       
    28 class MVIMPSTEngine;
       
    29 
       
    30 // CLASS  DECLARATION
       
    31 /**
       
    32  * IM AddContact command object.
       
    33  *  @lib vimpstcmdprocess.dll
       
    34  *  @since 5.0
       
    35  */
       
    36 NONSHARABLE_CLASS(CVIMPSTCmdAddContact) : 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 aContactId id of the contact to be aded..
       
    45          * @param aEngine instance of engine.
       
    46          * @return  A new instance of this class.
       
    47          */
       
    48         static CVIMPSTCmdAddContact* NewL(
       
    49                 const TInt aCommandId ,const TDesC& aContactId,
       
    50                 MVIMPSTEngine& aEngine);
       
    51 
       
    52         /**
       
    53          * Destructor.
       
    54          */
       
    55         ~CVIMPSTCmdAddContact();
       
    56 
       
    57     public: // From mvimpstcmd
       
    58        /**
       
    59         * see mvimpstcmd
       
    60         */
       
    61         void ExecuteLD();        
       
    62        /**
       
    63         * see mvimpstcmd
       
    64         */
       
    65         void AddObserver(
       
    66                 MVIMPSTCmdObserver& aObserver );
       
    67        /**
       
    68         * see mvimpstcmd
       
    69         */
       
    70 		TInt CommandId() const;		
       
    71 	   /**
       
    72         * see mvimpstcmd
       
    73         */	
       
    74 		TInt Result() const;
       
    75 		
       
    76 	         
       
    77 
       
    78     private: // Implementation
       
    79     
       
    80        /**
       
    81         * symbian default constructor
       
    82         * @param aCommandId        Command id.
       
    83         * @param aContactId id of the contact to be aded..
       
    84         * @param aEngine instance of engine.
       
    85         */
       
    86         CVIMPSTCmdAddContact(
       
    87                 const TInt aCommandId, 
       
    88                 const TDesC& aContactId, 
       
    89                 MVIMPSTEngine& aEngine);
       
    90                 
       
    91        /**
       
    92         * symbian second phase constructor
       
    93         */         
       
    94         void ConstructL();
       
    95         
       
    96         /**
       
    97         * check if contact is in the blocked list.
       
    98         * @param aUserId ,used id that is checked in blocked list.
       
    99         * @return, true if contact is in blocked list,other wise false.
       
   100         */
       
   101         TBool IsContactBlocked(const TDesC& aUserId);
       
   102         
       
   103     private: // Data
       
   104         
       
   105         //Command id
       
   106         const TInt iCommandId;  
       
   107         
       
   108         //contact id
       
   109         const TDesC& iContactId;
       
   110         
       
   111         //observer - doesnt own
       
   112         MVIMPSTCmdObserver* iObserver;  
       
   113         
       
   114         //doesnt own - engine for this service
       
   115         MVIMPSTEngine& iEngine;
       
   116         
       
   117         //error code.
       
   118         TInt iError;
       
   119 
       
   120     };
       
   121 
       
   122 #endif // CVIMPSTCMDADDCONTACT_H
       
   123 
       
   124 // End of File