omadrm/drmplugins/drmrohandler/inc/StringResourceReader.h
branchRCL_3
changeset 71 1221b68b8a5f
parent 67 50c53e893c3f
child 72 1481bf457703
equal deleted inserted replaced
67:50c53e893c3f 71:1221b68b8a5f
     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 *      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 
       
    57     private: // New functions
       
    58 
       
    59         void InitializeL();
       
    60 
       
    61     private: // Data members
       
    62 
       
    63         RFs& iFs;                ///< File server session.
       
    64         TBuf<256> iRscFileName;
       
    65         RResourceFile iResourceFile;
       
    66         TBool iInitialized;
       
    67     };
       
    68 
       
    69 #endif // STRINGRESOURCEREADER_H
       
    70 
       
    71 // End of file.