epoc32/include/barsc2.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
child 4 837f303aceeb
     1.1 --- a/epoc32/include/barsc2.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/barsc2.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,68 @@
     1.4 -barsc2.h
     1.5 +// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +// All rights reserved.
     1.7 +// This component and the accompanying materials are made available
     1.8 +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     1.9 +// which accompanies this distribution, and is available
    1.10 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.11 +//
    1.12 +// Initial Contributors:
    1.13 +// Nokia Corporation - initial contribution.
    1.14 +//
    1.15 +// Contributors:
    1.16 +//
    1.17 +// Description:
    1.18 +//
    1.19 +
    1.20 +#ifndef __BARSC2_H__
    1.21 +#define __BARSC2_H__
    1.22 +
    1.23 +#include <f32file.h>
    1.24 +
    1.25 +//Forward declarations
    1.26 +class RResourceFileImpl;
    1.27 +
    1.28 +/** Accesses a resource file or resource file buffer and reads the 
    1.29 +resource data into a buffer.
    1.30 +
    1.31 +Interpretation of the data is achieved using the RResourceReader class.
    1.32 +CResourceFile methods behaviour when some problem occurs - it leaves
    1.33 +with an error code. Most of the time the error code will be KErrCorrupt.
    1.34 +
    1.35 +@publishedAll 
    1.36 +@released
    1.37 +@see RResourceReader */
    1.38 +class CResourceFile : public CBase
    1.39 +	{
    1.40 +public:
    1.41 +	IMPORT_C static CResourceFile* NewL(RFs& aFs, const TDesC& aName, 
    1.42 +										TUint aFileOffset, TInt aFileSize);
    1.43 +	IMPORT_C static CResourceFile* NewLC(RFs& aFs, const TDesC& aName, 
    1.44 +										TUint aFileOffset, TInt aFileSize);
    1.45 +	IMPORT_C static CResourceFile* NewL(const TDesC8& aRscFileBuffer);
    1.46 +	IMPORT_C virtual ~CResourceFile();
    1.47 +	IMPORT_C TUidType UidType() const;
    1.48 +	IMPORT_C void ReadL(TDes8 &aDes,TInt aResourceId) const;
    1.49 +	IMPORT_C HBufC8 *AllocReadL(TInt aResourceId) const;
    1.50 +	IMPORT_C HBufC8 *AllocReadLC(TInt aResourceId) const;
    1.51 +	IMPORT_C void ConfirmSignatureL(TInt aSignature);
    1.52 +	IMPORT_C void ConfirmSignatureL();
    1.53 +	IMPORT_C TInt SignatureL() const;
    1.54 +	IMPORT_C TBool OwnsResourceIdL(TInt aResourceId) const;
    1.55 +	IMPORT_C TInt Offset() const;
    1.56 +private:
    1.57 +	CResourceFile();
    1.58 +	CResourceFile(const CResourceFile&);//prevent default copy constructor
    1.59 +	CResourceFile& operator=(const CResourceFile&);//prevent default "=" operator
    1.60 +	void ConstructL(RFs& aFs, const TDesC& aName, TUint aFileOffset, TInt aFileSize);
    1.61 +	void ConstructL(const TDesC8& aRscFileBuffer);
    1.62 +	RResourceFileImpl* Impl();
    1.63 +	const RResourceFileImpl* Impl() const;
    1.64 +private:
    1.65 +	enum
    1.66 +		{
    1.67 +		KRscFileSize = 24
    1.68 +		};
    1.69 +	TUint8 iImpl[KRscFileSize];
    1.70 +	};
    1.71 +
    1.72 +#endif//__BARSC2_H__