calendarengines/agnversit2/inc/AgnVersit2StringProvider.h
changeset 0 f979ecb2b13e
equal deleted inserted replaced
-1:000000000000 0:f979ecb2b13e
       
     1 #ifndef AGNVERSIT2STRINGPROVIDER_H
       
     2 #define AGNVERSIT2STRINGPROVIDER_H/*
       
     3 * Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
       
     4 * All rights reserved.
       
     5 * This component and the accompanying materials are made available
       
     6 * under the terms of "Eclipse Public License v1.0"
       
     7 * which accompanies this distribution, and is available
       
     8 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     9 *
       
    10 * Initial Contributors:
       
    11 * Nokia Corporation - initial contribution.
       
    12 *
       
    13 * Contributors:
       
    14 *
       
    15 * Description:   Caches language specific text fields from a
       
    16 *  resource file and provides access to them.
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 
       
    22 //System includes
       
    23 #include <e32base.h>				// CBase
       
    24 #include <f32file.h>				// RFs
       
    25 #include <barsc.h>					// RResourceFile
       
    26 #include <barsread.h>				// TResourceReader
       
    27 
       
    28 //User includes
       
    29 #include "agnversit2strings.hrh"	// TStringId
       
    30 
       
    31 /**
       
    32 Class to load and cache strings from resource files.
       
    33 @internalTechnology
       
    34 */
       
    35 class CAgnVersit2StringProvider : public CBase
       
    36 	{
       
    37 public:		// Construction/destruction.
       
    38 	static CAgnVersit2StringProvider* NewL();
       
    39 	~CAgnVersit2StringProvider();
       
    40 
       
    41 public:		// Methods.
       
    42 	const TDesC& StringL(TStringId aStringId);
       
    43 
       
    44 private:	// Construction.
       
    45 	CAgnVersit2StringProvider();
       
    46 	void ConstructL();
       
    47 
       
    48 private:	// Methods.
       
    49 	void ReadStringFromResourceL(TStringId aStringId);
       
    50 	void ReadAllStringsL();
       
    51 	
       
    52 private:	// Members.
       
    53 	RFs iFs;
       
    54 	HBufC* iResourceBuffer;
       
    55 	RResourceFile iResourceFile;
       
    56 	TResourceReader iResourceReader;
       
    57 	RPointerArray<HBufC> iStringArray;
       
    58 	};
       
    59 
       
    60 #endif // AGNVERSIT2STRINGPROVIDER_H
       
    61 
       
    62 // End of file.