phonebookui/Phonebook2/UIExtensionManager/inc/CPbk2UIExtensionIconInformation.h
changeset 0 e686773b3f54
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 /*
       
     2 * Copyright (c) 2002-2007 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:  A class that reads the icon information of the extension
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CPBK2UIEXTENSIONICONINFORMATION_H
       
    21 #define CPBK2UIEXTENSIONICONINFORMATION_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32base.h>
       
    25 #include <Pbk2IconArrayId.hrh>
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class TResourceReader;
       
    29 
       
    30 // CLASS DECLARATION
       
    31 
       
    32 /**
       
    33  * Reads the icon information of the UI extension. 
       
    34  * This class is responsible for reading the UI Extension
       
    35  * icon information resource structure during UI extension
       
    36  * initialization.
       
    37  */
       
    38 NONSHARABLE_CLASS(CPbk2UIExtensionIconInformation) : 
       
    39         public CBase
       
    40     {
       
    41     public:  // Constructors and destructor
       
    42         /**
       
    43          * Two-phased constructor.
       
    44          * @param aResourceId A resource id of 
       
    45          *                    PHONEBOOK2_EXTENSION_ICON_INFORMATION.
       
    46          * @return A new instance of this class.
       
    47          */
       
    48         static CPbk2UIExtensionIconInformation* NewL(
       
    49                 TInt aResourceId);
       
    50         
       
    51         /**
       
    52          * Destructor.
       
    53          */
       
    54         ~CPbk2UIExtensionIconInformation();
       
    55 
       
    56     public: // New functions
       
    57         /**
       
    58          * Returns the resource id of the PBK2_ICON_INFO array of
       
    59          * the extension.
       
    60          * @return The resource id of the PBK2_ICON_INFO array.
       
    61          */
       
    62         TInt IconInfoArrayResourceId();
       
    63         
       
    64         /**
       
    65          * Finds the icon array extension.
       
    66          *
       
    67          * @param aParentArrayId The phonebook2 icon array id.
       
    68          * @param aResId A reference to the resource id of 
       
    69          *        the icon array of the extension if found.
       
    70          * @return ETrue if the resource was found.
       
    71          */
       
    72         TBool FindIconArrayExtension(TPbk2IconArrayId aParentArrayId,
       
    73                 TInt& aResId);
       
    74 
       
    75     private: // implementation
       
    76         CPbk2UIExtensionIconInformation();
       
    77         void ConstructL(TInt aResourceId);
       
    78 
       
    79     private: // implementation structure
       
    80         class TIconArrayInfo
       
    81             {
       
    82             public:
       
    83                 TIconArrayInfo(TResourceReader& aReader);
       
    84             
       
    85             public: // Data
       
    86                 /// Own: Parent array id
       
    87                 TPbk2IconArrayId iParentArrayId;
       
    88                 /// Own: Extension Icon array resource id
       
    89                 TInt iExtensionIconArrayResId;
       
    90             };
       
    91 
       
    92     private:    // Data
       
    93         /// Own: icon info array resource id
       
    94         TInt iIconInfoArrayResId;
       
    95         /// Own: icon array extensions
       
    96         RArray<TIconArrayInfo> iIconArrayExtensions;
       
    97     };
       
    98 
       
    99 #endif      // CPBK2UIEXTENSIONICONINFORMATION_H
       
   100             
       
   101 // End of File