pushmtm/Plugins/PushContentHandler/StringResourceReader.h
branchRCL_3
changeset 69 4455192101e4
parent 65 8e6fa1719340
equal deleted inserted replaced
65:8e6fa1719340 69:4455192101e4
     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 the License "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 *      Declaration of CStringResourceReader.
       
    16 *      
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 #ifndef STRINGRESOURCEREADER_H
       
    22 #define STRINGRESOURCEREADER_H
       
    23 
       
    24 // INCLUDE FILES
       
    25 
       
    26 #include <e32base.h>
       
    27 #include <e32std.h>
       
    28 #include <barsc.h>
       
    29 
       
    30 // FORWARD DECLARATIONS
       
    31 
       
    32 class RFs;
       
    33 
       
    34 // CLASS DECLARATION
       
    35 
       
    36 /**
       
    37 * Utility class that helps reading string resources without CONE.
       
    38 * Not intended for derivation.
       
    39 */
       
    40 class CStringResourceReader : public CBase
       
    41     {
       
    42     public: // Constructors and destructor
       
    43 
       
    44         CStringResourceReader( RFs& aFs, const TDesC& aRscFileWithPathAndDrive );
       
    45 
       
    46         ~CStringResourceReader();
       
    47 
       
    48     public: // New functions
       
    49 
       
    50         /**
       
    51         * Return a given string from resource.
       
    52         * @param aResId Resource ID.
       
    53         * @return See above.
       
    54         */
       
    55         HBufC* AllocReadResourceL( TInt aResId );
       
    56         HBufC* AllocReadResourceLC( TInt aResId );
       
    57 
       
    58     private: // New functions
       
    59 
       
    60         void InitializeL();
       
    61 
       
    62     private: // Data members
       
    63 
       
    64         RFs& iFs;                ///< File server session.
       
    65         TBuf<64> iRscFileName;
       
    66         RResourceFile iResourceFile;
       
    67         TBool iInitialized;
       
    68     };
       
    69 
       
    70 #endif // STRINGRESOURCEREADER_H
       
    71 
       
    72 // End of file.