imstutils/imconversationview/imcvuiapp/inc/cimcvcommandinfo.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:  Ccommand info
       
    15 *
       
    16 */
       
    17 #ifndef __CIMCVCOMMANDINFO_H__
       
    18 #define __CIMCVCOMMANDINFO_H__
       
    19 
       
    20 // INCLUDES
       
    21 #include <e32base.h>
       
    22 
       
    23 // FORWARD DECLARATIONS
       
    24 class TResourceReader;
       
    25 
       
    26 /**
       
    27  *  command info
       
    28  */
       
    29 class CIMCVCommandInfo : public CBase
       
    30     {
       
    31     	
       
    32     public:    
       
    33         /**
       
    34          * Static factory function that performs the 2-phased construction.
       
    35          *
       
    36          * @param aReader Reference to resource reader to be used
       
    37          * @param aId Id of the component owning the command IDs
       
    38          * @param anewCommandIds New command IDs
       
    39          * @return New instance of this class
       
    40          */
       
    41         static CIMCVCommandInfo* NewLC( TResourceReader& aReader,
       
    42                                     TInt32 aPluginId,
       
    43         							TInt& aNewCommandIds );
       
    44         
       
    45         /**
       
    46          * Destructor.
       
    47          */
       
    48         ~CIMCVCommandInfo();
       
    49         
       
    50     public:
       
    51     
       
    52     	/**
       
    53     	 * Returns the plugin ID from command info
       
    54     	 *
       
    55     	 * @return The plugin ID related to this command info
       
    56     	 */
       
    57         TInt32 PluginId() const;
       
    58     	
       
    59     	/**
       
    60     	 * Gets the new command ID
       
    61     	 *
       
    62     	 * @return The new command ID
       
    63     	 */    	
       
    64     	TInt32 NewCommandId() const;
       
    65 
       
    66     	/**
       
    67     	 * Gets the old/original command ID
       
    68     	 *
       
    69     	 * @return The old/original command ID
       
    70     	 */
       
    71     	TInt32 OldCommandId() const;
       
    72 		
       
    73     private:
       
    74     
       
    75     	/**
       
    76          * Constructor.
       
    77          */
       
    78         CIMCVCommandInfo( TInt32 aPluginId );
       
    79         
       
    80         /**
       
    81          * 2nd phase constructor.
       
    82          */
       
    83         void ConstructL( TResourceReader& aReader,
       
    84         					TInt& aNewCommandIds );        					        
       
    85 
       
    86     private: // Data
       
    87         // plugin id
       
    88         TInt32 iPluginId;
       
    89         
       
    90         //new command id form the command pool
       
    91 		TInt32 iNewCommandId;	
       
    92 		
       
    93 		//old command id from the plugin
       
    94 		TInt32 iOldCommandId;
       
    95     };
       
    96         
       
    97 
       
    98 #endif // __CIMCVCOMMANDINFO_H__
       
    99 
       
   100 // End of File