uigraphics/AknIcon/inc/AknIconLocationInfo.h
changeset 0 05e9090e2422
child 55 33ddb261ab37
equal deleted inserted replaced
-1:000000000000 0:05e9090e2422
       
     1 /*
       
     2 * Copyright (c) 2002 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:   
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef AKN_ICON_LOCATION_INFO_H
       
    21 #define AKN_ICON_LOCATION_INFO_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <e32base.h>
       
    25 #include <mifheader.cdl.h>
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 
       
    29 // CONSTANTS
       
    30 
       
    31 // CLASS DEFINITIONS
       
    32 
       
    33 NONSHARABLE_CLASS(CAknIconLocationInfo) : public CBase
       
    34     {
       
    35     public: // Constructor and destructor
       
    36 
       
    37         // Used for V3 MIF files, which have icon index table in a CDL instance.
       
    38         static CAknIconLocationInfo* NewL(
       
    39             const TDesC& aFileName,
       
    40             MifHeader::CInstance& aOffsets );
       
    41 
       
    42         // Used for V2 MIF files, which have icon index table in the MIF file.
       
    43         static CAknIconLocationInfo* NewL(
       
    44             const TDesC& aFileName,
       
    45             const TDesC8& aOffsetArray );
       
    46 
       
    47         // Used for V1 MIF files, which do not encode icon type information.
       
    48         static CAknIconLocationInfo* NewL(
       
    49             const TDesC& aFileName );
       
    50 
       
    51         /**
       
    52         * Constructor only for compare items.
       
    53         */
       
    54         CAknIconLocationInfo( const TDesC& aFileName );
       
    55 
       
    56         ~CAknIconLocationInfo();
       
    57 
       
    58     public: // New functions
       
    59 
       
    60         static TInt LinearOrder(
       
    61             const CAknIconLocationInfo& aFirst,
       
    62             const CAknIconLocationInfo& aSecond );
       
    63 
       
    64         /**
       
    65         * Returns KErrEof if the icon with the given index is not found.
       
    66         */
       
    67         TInt GetIconLocation( TInt16& aBitmapId, TInt16& aMaskId ) const;
       
    68 
       
    69     private: // Private constructors
       
    70 
       
    71         CAknIconLocationInfo();
       
    72 
       
    73         void ConstructL(
       
    74             const TDesC& aFileName,
       
    75             MifHeader::CInstance& aOffsets );
       
    76 
       
    77         void ConstructL(
       
    78             const TDesC& aFileName,
       
    79             const TDesC8& aOffsetArray );
       
    80 
       
    81         void ConstructL( const TDesC& aFileName );
       
    82 
       
    83     public: // Data
       
    84         HBufC* iFileName;
       
    85         const TDesC* iFileNameRef; // used by compare items
       
    86 
       
    87         TInt* iLocations; // array
       
    88         TInt iCount;
       
    89         MifHeader::CInstance* iSharedOffsets;
       
    90     };
       
    91 
       
    92 #endif // AKN_ICON_LOCATION_INFO_H
       
    93 
       
    94 // End of File