RResourceFile Class Reference

class RResourceFile

Accesses a resource file and reads the resource data into a buffer.

Interpretation of the data is achieved using the TResourceReader class.

RResourceFile instance behaviour when some problem occurs - it panics. Or asserts, if the used method is not "L" method.

Expected behaviour when assignment operator or copy constructor is called: The class doesn't have assignment operator and copy constructor, so the compiler generated ones will be used. The heap buffers used by the source class instance will be shared with the destination class instance.

Expected behaviour when the RResourceFile instance is about to be destroyed: The class doesn't have destructor so compiler generated one will be used. Always call Close() to free allocated by the instance resources.

TResourceReader

Public Member Functions
RResourceFile()
IMPORT_C HBufC8 *AllocReadL(TInt)
IMPORT_C HBufC8 *AllocReadLC(TInt)
IMPORT_C voidClose()
IMPORT_C voidConfirmSignatureL(TInt)
IMPORT_C voidConfirmSignatureL()
TInt Offset()
IMPORT_C voidOpenL(RFs &, const TDesC &)
IMPORT_C voidOpenL(RFs &, const TDesC &, TUint, TInt)
IMPORT_C TBoolOwnsResourceId(TInt)
IMPORT_C TBoolOwnsResourceIdL(TInt)
IMPORT_C voidReadL(TDes8 &, TInt)
IMPORT_C TIntSignatureL()
IMPORT_C TUidTypeUidType()
Private Member Functions
voidDoOpenL(RFs &, const TDesC &, TUint, TInt)
RResourceFileImpl *Impl()
const RResourceFileImpl *Impl()
IMPORT_C TIntOffset2()
Private Member Enumerations
enumanonymous { KRscFileSize = 24 }
Private Attributes
TUint8 iImpl

Constructor & Destructor Documentation

RResourceFile()

IMPORT_CRResourceFile()

Member Functions Documentation

AllocReadL(TInt)

IMPORT_C HBufC8 *AllocReadL(TIntaResourceId)const

Parameters

TInt aResourceId

AllocReadLC(TInt)

IMPORT_C HBufC8 *AllocReadLC(TIntaResourceId)const

Parameters

TInt aResourceId

Close()

IMPORT_C voidClose()

ConfirmSignatureL(TInt)

IMPORT_C voidConfirmSignatureL(TIntaSignature)

Parameters

TInt aSignature

ConfirmSignatureL()

IMPORT_C voidConfirmSignatureL()

DoOpenL(RFs &, const TDesC &, TUint, TInt)

voidDoOpenL(RFs &aFs,
const TDesC &aName,
TUintaFileOffset,
TIntaFileSize
)[private]

Parameters

RFs & aFs
const TDesC & aName
TUint aFileOffset
TInt aFileSize

Impl()

RResourceFileImpl *Impl()[private]

Impl()

const RResourceFileImpl *Impl()const [private]

Offset()

TInt Offset()const [inline]

Returns the offset value defined for this resource file.

This function must not be called until a call to ConfirmSignatureL() has completed successfully, otherwise the value returned by this function may be meaningless.

The offset value defined for this resource file.

RResourceFile::ConfirmSignatureL()

Offset2()

IMPORT_C TIntOffset2()const [private]

OpenL(RFs &, const TDesC &)

IMPORT_C voidOpenL(RFs &aFs,
const TDesC &aName
)

Parameters

RFs & aFs
const TDesC & aName

OpenL(RFs &, const TDesC &, TUint, TInt)

IMPORT_C voidOpenL(RFs &aFs,
const TDesC &aName,
TUintaFileOffset,
TIntaFileSize
)

Parameters

RFs & aFs
const TDesC & aName
TUint aFileOffset
TInt aFileSize

OwnsResourceId(TInt)

IMPORT_C TBoolOwnsResourceId(TIntaResourceId)const

Parameters

TInt aResourceId

OwnsResourceIdL(TInt)

IMPORT_C TBoolOwnsResourceIdL(TIntaResourceId)const

Parameters

TInt aResourceId

ReadL(TDes8 &, TInt)

IMPORT_C voidReadL(TDes8 &aDes,
TIntaResourceId
)const

Parameters

TDes8 & aDes
TInt aResourceId

SignatureL()

IMPORT_C TIntSignatureL()const

UidType()

IMPORT_C TUidTypeUidType()const

Member Enumerations Documentation

Enum anonymous

Enumerators

KRscFileSize = 24

Member Data Documentation

TUint8 iImpl

TUint8 iImpl[private]