uigraphics/AknIcon/srvinc/AknIconSrvPrecacheItem.inl
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 // INCLUDE FILES
       
    21 #include "AknIconSrvDef.h"
       
    22 
       
    23 // CONSTANTS
       
    24 
       
    25 // ================= MEMBER FUNCTIONS ==========================================
       
    26 
       
    27 // -----------------------------------------------------------------------------
       
    28 // CAknIconSrvPrecacheItem::FileName
       
    29 // -----------------------------------------------------------------------------
       
    30 //
       
    31 inline const TDesC& CAknIconSrvPrecacheItem::FileName() const
       
    32     {
       
    33     if ( iFileNameRef )
       
    34         {
       
    35         return *iFileNameRef;
       
    36         }
       
    37 
       
    38     if ( iSkinnedIconFile )
       
    39         {
       
    40         return *iSkinnedIconFile;
       
    41         }
       
    42 
       
    43     return *iFallbackIconFile;
       
    44     }
       
    45 
       
    46 // -----------------------------------------------------------------------------
       
    47 // CAknIconSrvPrecacheItem::GetFullFileName
       
    48 // -----------------------------------------------------------------------------
       
    49 //
       
    50 inline void CAknIconSrvPrecacheItem::GetFullFileName( TDes& aFileName ) const
       
    51     {
       
    52     if ( iFileNameRef )
       
    53         {
       
    54         aFileName = *iFileNameRef;
       
    55         }
       
    56     else if ( iSkinnedIconFile )
       
    57         {
       
    58         if ( iFlags & EFlagDefaultIconDirSkinned )
       
    59             {
       
    60             aFileName = KAknIconDefaultDir;
       
    61             }
       
    62         aFileName.Append( *iSkinnedIconFile );
       
    63         }
       
    64     else
       
    65         {
       
    66         if ( iFlags & EFlagDefaultIconDirFallback )
       
    67             {
       
    68             aFileName = KAknIconDefaultDir;
       
    69             }
       
    70         aFileName.Append( *iFallbackIconFile );
       
    71         }
       
    72     }
       
    73 
       
    74 // -----------------------------------------------------------------------------
       
    75 // CAknIconSrvPrecacheItem::IsSkinned
       
    76 // -----------------------------------------------------------------------------
       
    77 //
       
    78 inline TBool CAknIconSrvPrecacheItem::IsSkinned() const
       
    79     {
       
    80     return iSkinIdMajor != -1 || iSkinIdMinor != -1;
       
    81     }
       
    82 
       
    83 //  End of File