textinput/peninputcommonlayout/inc/peninputnumerickeymappingmgr.h
changeset 40 2cb9bae34d17
parent 31 f1bdd6b078d1
child 49 37f5d84451bd
equal deleted inserted replaced
31:f1bdd6b078d1 40:2cb9bae34d17
     1 /*
       
     2 * Copyright (c) 2002-2005 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:  vkb number keymapping manager header file
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_CPENINPUTNUMERICKEYMAPPINGMGR_H
       
    20 #define C_CPENINPUTNUMERICKEYMAPPINGMGR_H
       
    21 
       
    22 // System includes
       
    23 #include <e32base.h>
       
    24 #include <barsread.h>
       
    25 
       
    26 /**
       
    27  *  vkb number keymapping manager class
       
    28  *
       
    29  *  This class is to manage number keymapping. When this class contructs, keymapping 
       
    30  *  manager loads all mapping number key string from resource file. User can get 
       
    31  *  mapping key string according to keymapping id and delete all internal value when 
       
    32  *  destructing or calling reset.
       
    33  *
       
    34  *  @lib peninputcommonlayout.lib
       
    35  *  @since S60 v3.2
       
    36  */
       
    37 class CPeninputNumericKepMappingMgr : public CBase
       
    38     {
       
    39     
       
    40 public:
       
    41 
       
    42     /**
       
    43      * Two-phased constructor
       
    44      *
       
    45      * @since S60 v3.2
       
    46      * @param aReader Resource reader      
       
    47      * @return The pointer to CPeninputNumericKepMappingMgr object
       
    48      */
       
    49     IMPORT_C static CPeninputNumericKepMappingMgr* NewL( 
       
    50         TResourceReader aReader );
       
    51 
       
    52     /**
       
    53      * Two-phased constructor
       
    54      *
       
    55      * @since S60 v3.2
       
    56      * @param aReader Resource reader       
       
    57      * @return The pointer to CPeninputNumericKepMappingMgr object
       
    58      */    
       
    59     IMPORT_C static CPeninputNumericKepMappingMgr* NewLC( 
       
    60         TResourceReader aReader );
       
    61 
       
    62     /**
       
    63      * Destructor
       
    64      *
       
    65      * @since S60 v3.2
       
    66      * @return None
       
    67      */
       
    68     IMPORT_C virtual ~CPeninputNumericKepMappingMgr();
       
    69  
       
    70     /**
       
    71      * Remove all keymapping ids and strings in array 
       
    72      *
       
    73      * @since S60 v3.2
       
    74      * @return None
       
    75      */
       
    76     IMPORT_C void Reset();
       
    77 
       
    78     /**
       
    79      * Get count of items in keymapping id array 
       
    80      *
       
    81      * @since S60 v3.2
       
    82      * @return The count of items in keymapping id array 
       
    83      */  
       
    84     IMPORT_C TInt Count() const;
       
    85 
       
    86     /**
       
    87      * Get keymapping string by keymapping id
       
    88      *
       
    89      * @since S60 v3.2
       
    90      * @param aKeyMappingId Keymapping id
       
    91      * @return The pointer to HBufC data containing keymapping string 
       
    92      */    
       
    93     IMPORT_C HBufC* KeyMappingStringL( const TInt aKeyMappingId ) const;
       
    94     
       
    95     /**
       
    96      * Get Arabic keymapping string by keymapping id
       
    97      *
       
    98      * @since S60 v3.2
       
    99      * @param aKeyMappingId Keymapping id
       
   100      * @return The pointer to HBufC data containing Arabic keymapping string 
       
   101      */    
       
   102     IMPORT_C HBufC* KeyMappingStringL( const TInt aKeyMappingID, 
       
   103                                        const TInt aLang ) const;
       
   104          
       
   105 protected:
       
   106 
       
   107     /**
       
   108      * Symbian second-phase constructor
       
   109      *
       
   110      * @since S60 v3.2
       
   111      * @param aReader Resource reader         
       
   112      * @return None
       
   113      */ 
       
   114     void ConstructL( TResourceReader aReader );
       
   115     
       
   116 private: // Data
       
   117 
       
   118     /**
       
   119      * Keymapping id array
       
   120      */  
       
   121     RArray<TInt> iKeyMappingIdList;
       
   122     
       
   123     /**
       
   124      * Keymapping string array
       
   125      */          
       
   126     RPointerArray<HBufC> iKeyMappingStringList;
       
   127     
       
   128     };
       
   129 
       
   130 #endif // C_CPENINPUTNUMERICKEYMAPPINGMGR_H