uigraphics/AknIcon/srvinc/AknIconFileNameCache.h
changeset 0 05e9090e2422
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_FILE_NAME_CACHE_H
       
    21 #define AKN_ICON_FILE_NAME_CACHE_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <e32base.h>
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class CAknIconFileNameItem;
       
    28 
       
    29 // CONSTANTS
       
    30 
       
    31 // CLASS DEFINITIONS
       
    32 
       
    33 NONSHARABLE_CLASS(CAknIconFileNameCache) : public CBase
       
    34     {
       
    35     public: // Constructor and destructor
       
    36 
       
    37         static CAknIconFileNameCache* NewL();
       
    38 
       
    39         ~CAknIconFileNameCache();
       
    40 
       
    41     public: // New functions
       
    42     
       
    43         /*
       
    44         * Caches the icon file name if it is not already in the cache and returns
       
    45         * a pointer to the cached file name object.
       
    46         *        
       
    47         * @param aFileName file name to be cached
       
    48         * @return reference to an HBufC object containing a copy of the icon file.
       
    49         *         Note: The returned object is owned by the file name cache object and
       
    50         *         it is never NULL.
       
    51         */        
       
    52         HBufC* CacheIconFileNameL( const TDesC& aFileName );   
       
    53         
       
    54 
       
    55     private: // Private constructors
       
    56 
       
    57         CAknIconFileNameCache();
       
    58 
       
    59     private: // New functions    
       
    60     
       
    61         /*
       
    62         * Gets cached icon file name if found.
       
    63         *
       
    64         * @param aFileName file name to be found
       
    65         * @return HBufC object containing the icon file name if the file name
       
    66         *         is found otherwise NULL
       
    67         */        
       
    68         HBufC* GetIconFileName( const TDesC& aFileName ) const;   
       
    69         
       
    70         /*
       
    71         * Stores icon file name in icon file name cache.
       
    72         * @param aFileName file name to be stored.
       
    73         * @return HBufC object of the stored the icon file name.
       
    74         */           
       
    75         HBufC* StoreIconFileNameL( const TDesC& aFileName );
       
    76 
       
    77     private: // Data
       
    78     
       
    79         // Cached information of icon file names
       
    80         RPointerArray<CAknIconFileNameItem> iFileNameItems;        
       
    81     };
       
    82 
       
    83 #endif // AKN_ICON_FILE_NAME_CACHE_H
       
    84 
       
    85 // End of File