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 void | Close() |
IMPORT_C void | ConfirmSignatureL(TInt) |
IMPORT_C void | ConfirmSignatureL() |
TInt | Offset() |
IMPORT_C void | OpenL(RFs &, const TDesC &) |
IMPORT_C void | OpenL(RFs &, const TDesC &, TUint, TInt) |
IMPORT_C TBool | OwnsResourceId(TInt) |
IMPORT_C TBool | OwnsResourceIdL(TInt) |
IMPORT_C void | ReadL(TDes8 &, TInt) |
IMPORT_C TInt | SignatureL() |
IMPORT_C TUidType | UidType() |
Private Member Functions | |
---|---|
void | DoOpenL(RFs &, const TDesC &, TUint, TInt) |
RResourceFileImpl * | Impl() |
const RResourceFileImpl * | Impl() |
IMPORT_C TInt | Offset2() |
Private Member Enumerations | |
---|---|
enum | anonymous { KRscFileSize = 24 } |
Private Attributes | |
---|---|
TUint8 | iImpl |
void | DoOpenL | ( | RFs & | aFs, |
const TDesC & | aName, | |||
TUint | aFileOffset, | |||
TInt | aFileSize | |||
) | [private] |
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.
IMPORT_C void | OpenL | ( | RFs & | aFs, |
const TDesC & | aName, | |||
TUint | aFileOffset, | |||
TInt | aFileSize | |||
) |
IMPORT_C TBool | OwnsResourceIdL | ( | TInt | aResourceId | ) | const |
TInt aResourceId |