IMPORT_C void | OpenL | ( | RFs & | aFs, |
| const TDesC & | aSpiPath, |
| const TDesC & | aSpiName |
| ) | |
Open the resource archive reader, this is usually used in composite rom drive situation where multiple independent rom images are mapped to a single rom drive and each rom image may consist 0..n spi files. Spi files in each rom image are labelled with the rom image id(example ecom-<id>-0.spi) with the id itself indicating the order of mounting/reading of the spi files. RResourceArchive will always mount/read the spi files in ascending order of the rom image id i.e. ecom-2-0.spi is mounted after ecom-1-0.spi and etc.
As a result of this mounting order,it is possible to replace a resource inside an spi with the resource with same name from a later mounted spi. It is also possible to specify in an spi file the hiding of resource in another spi file.(See example below)
In the presence of localised spi files(ecom-<id>-0.sNN where NN is language code) the spi files will be resolved internally based on existing language downgrade path.(See example below)
Example of use case:
z:\private\10009d8f\ecom-0-0.spi (ROM IMAGE 0)
z:\private\10009d8f\ecom-0-1.s02 (ROM IMAGE 0)
z:\private\10009d8f\ecom-1-0.spi (ROM IMAGE 1)
In this situation the function call to RResourceArchive should be:
RResourceArchive::OpenL(RFs,_L("z:\\private\\10009d8f\\"),_L("ecom"));
Example of multiple spi files and the visibility of the resource files
under two different language downgrade path(DGP):
-------------------------------------------------------------------------------
| | | |Resource Visibility
Ecom-1-0.spi| Ecom-1-0.s02 | Ecom-2-0.spi | Ecom-2-0.s02 |DGP(1) | DGP(2-1)
-------------------------------------------------------------------------------
A.RSC | A.R02 | B.RSC | Hide D.R02 |A.RSC(1) | A.R02(1)
B.RSC | D.R02 | | C.R02 |B.RSC(2) | B.RSC(2)
C.RSC | | | |C.RSC(1) | C.R02(2)
-------------------------------------------------------------------------------
Parameters |
---|
aFs | Handle to a file server session |
aSpiPath | full path of the folder that contains the spi file |
aSpiName | the default spi name without any image id and extension |
Leave Codes |
---|
KErrNotFound | if there is no single file matching aSpiName in the path KErrCorrupt if the spi file is corrupted |
Panic Codes |
---|
EBafPanicBadResourceFileFormat | if the spi files that match the pattern do not share a common spi type. |