phoneapp/phoneuiutils/inc/tphonetouchbuttonconfig.h
changeset 0 5f000ab63145
equal deleted inserted replaced
-1:000000000000 0:5f000ab63145
       
     1 /*
       
     2 * Copyright (c) 2009 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: Touch button configuration.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef TPHONETOUCHBUTTONCONFIG_H
       
    19 #define TPHONETOUCHBUTTONCONFIG_H
       
    20 
       
    21 #include <e32std.h>
       
    22 #include "phoneui.hrh"
       
    23 
       
    24 const TInt    KTelButtonsConfigKeyCount = 1; 
       
    25 
       
    26 /**
       
    27  *  Touch button configuration.
       
    28  *
       
    29  *
       
    30  *
       
    31  *  @lib PhoneUiUtils.lib
       
    32  *  @since S60 v5.0
       
    33  */
       
    34 class TPhoneTouchButtonConfig
       
    35     {
       
    36 public:
       
    37     TPhoneTouchButtonConfig();
       
    38 
       
    39     /**
       
    40      * Read configuration from resource file.
       
    41      *
       
    42      * @since S60 5.0
       
    43      * @return KErrNone if successful, otherwise error code.
       
    44      */
       
    45     TInt ReadConfiguration();
       
    46    
       
    47     /**
       
    48      * Returns resource id from configuration.
       
    49      *
       
    50      * @since S60 5.0
       
    51      * @param aButtons Requested configuration.
       
    52      * @param aDefaultResourceId This is returned, if config is not found.  
       
    53      * @return Resource id.
       
    54      */
       
    55     TInt ResourceId( TPhoneUIConfigurableButtons aButtons, 
       
    56                      TInt aDefaultResourceId ) const;
       
    57 
       
    58 private:
       
    59     void ReadCenRepKeysL( 
       
    60             TFixedArray<TInt,KTelButtonsConfigKeyCount>& aKeyValues ) const;
       
    61     void ReadConfigResourceL( 
       
    62             const TFixedArray<TInt,KTelButtonsConfigKeyCount>& aKeyValues );
       
    63     
       
    64     inline TInt MapToCenRepKey( TInt aButtons ) const;
       
    65     
       
    66 private:
       
    67     TFixedArray<TInt,EPhoneButtonConfigCount> iConfiguration;
       
    68     };
       
    69 
       
    70 #endif // TPHONETOUCHBUTTONCONFIG_H
       
    71             
       
    72 // End of File