uigraphics/AknIcon/srvinc/AknIconSrvTlsData.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 
       
    21 #ifndef AKN_ICON_SRV_TLS_DATA_H
       
    22 #define AKN_ICON_SRV_TLS_DATA_H
       
    23 
       
    24 //  INCLUDES
       
    25 
       
    26 #include <e32std.h>
       
    27 #include <f32file.h>
       
    28 #include "AknIconSrvClient.h"
       
    29 #include "AknIconSrvDef.h"
       
    30 
       
    31 // FORWARD DECLARATIONS
       
    32 class CAknIconLoader;
       
    33 class CAknIconLocationInfo;
       
    34 class CAknIconFileNameCache;
       
    35 
       
    36 // CLASS DECLARATION
       
    37 
       
    38 /**
       
    39 * TLS data. It has a connected client to AknIconServer.
       
    40 */
       
    41 NONSHARABLE_CLASS(CAknIconSrvTlsData) :
       
    42     public CBase
       
    43     {
       
    44     public:  // Constructors and destructor
       
    45 
       
    46         /**
       
    47         * Creates TLS data and installs it in TLS.
       
    48         */
       
    49         static void CreateSingletonL();
       
    50 
       
    51         ~CAknIconSrvTlsData();
       
    52 
       
    53     public: // New functions
       
    54 
       
    55         /**
       
    56         * Initializes icon loader for the given file.
       
    57         */
       
    58         void InitIconLoaderL( const TDesC& aFileName, RFile* aFile );
       
    59         
       
    60         inline CAknIconLoader* IconLoader();
       
    61 
       
    62         inline const TAknIconInitData& InitData() const;
       
    63         
       
    64         /**
       
    65         * Connects the file server session if not already connected,
       
    66         * and returns it. The file server session should always be
       
    67         * accessed via this method, to ensure that it is connected.
       
    68         */
       
    69         RFs& FsSessionL();
       
    70 
       
    71         TInt GetIconLocationInfo(
       
    72             const TDesC& aFileName, TInt16& aBitmapId, TInt16& aMaskId );
       
    73 
       
    74         void StoreIconLocationInfoL( CAknIconLocationInfo* aInfo );
       
    75         
       
    76         inline CAknIconFileNameCache& IconFileNameCache();
       
    77 
       
    78     private:
       
    79 
       
    80         CAknIconSrvTlsData();
       
    81         void ConstructL();
       
    82 
       
    83     public: // Data
       
    84 
       
    85         RAknIconSrvClient iIconSession;
       
    86         TAknIconInitData iInitData;
       
    87 
       
    88         RArray<TUint> iPointers;
       
    89 
       
    90         HBufC* iFileName;
       
    91         CAknIconLoader* iLoader;
       
    92 
       
    93         // Cached information of the icon locations (MIF/MBM) in the used icon files
       
    94         RPointerArray<CAknIconLocationInfo> iIconLocations;
       
    95                 
       
    96         // Cached information of icon file names
       
    97         CAknIconFileNameCache* iFileNameCache;
       
    98         
       
    99     private: // Data
       
   100 
       
   101         RFs iFsSession;
       
   102     };
       
   103     
       
   104 #include "AknIconSrvTlsData.inl"
       
   105 
       
   106 #endif      // AKN_ICON_SRV_TLS_DATA_H   
       
   107             
       
   108 // End of File