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