epoc32/include/barsc2.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
child 4 837f303aceeb
--- a/epoc32/include/barsc2.h	Tue Nov 24 13:55:44 2009 +0000
+++ b/epoc32/include/barsc2.h	Tue Mar 16 16:12:26 2010 +0000
@@ -1,1 +1,68 @@
-barsc2.h
+// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// 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
+// which accompanies this distribution, and is available
+// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#ifndef __BARSC2_H__
+#define __BARSC2_H__
+
+#include <f32file.h>
+
+//Forward declarations
+class RResourceFileImpl;
+
+/** Accesses a resource file or resource file buffer and reads the 
+resource data into a buffer.
+
+Interpretation of the data is achieved using the RResourceReader class.
+CResourceFile methods behaviour when some problem occurs - it leaves
+with an error code. Most of the time the error code will be KErrCorrupt.
+
+@publishedAll 
+@released
+@see RResourceReader */
+class CResourceFile : public CBase
+	{
+public:
+	IMPORT_C static CResourceFile* NewL(RFs& aFs, const TDesC& aName, 
+										TUint aFileOffset, TInt aFileSize);
+	IMPORT_C static CResourceFile* NewLC(RFs& aFs, const TDesC& aName, 
+										TUint aFileOffset, TInt aFileSize);
+	IMPORT_C static CResourceFile* NewL(const TDesC8& aRscFileBuffer);
+	IMPORT_C virtual ~CResourceFile();
+	IMPORT_C TUidType UidType() const;
+	IMPORT_C void ReadL(TDes8 &aDes,TInt aResourceId) const;
+	IMPORT_C HBufC8 *AllocReadL(TInt aResourceId) const;
+	IMPORT_C HBufC8 *AllocReadLC(TInt aResourceId) const;
+	IMPORT_C void ConfirmSignatureL(TInt aSignature);
+	IMPORT_C void ConfirmSignatureL();
+	IMPORT_C TInt SignatureL() const;
+	IMPORT_C TBool OwnsResourceIdL(TInt aResourceId) const;
+	IMPORT_C TInt Offset() const;
+private:
+	CResourceFile();
+	CResourceFile(const CResourceFile&);//prevent default copy constructor
+	CResourceFile& operator=(const CResourceFile&);//prevent default "=" operator
+	void ConstructL(RFs& aFs, const TDesC& aName, TUint aFileOffset, TInt aFileSize);
+	void ConstructL(const TDesC8& aRscFileBuffer);
+	RResourceFileImpl* Impl();
+	const RResourceFileImpl* Impl() const;
+private:
+	enum
+		{
+		KRscFileSize = 24
+		};
+	TUint8 iImpl[KRscFileSize];
+	};
+
+#endif//__BARSC2_H__