symbian SISController currently being considered,are summed.From Figure 1-Embedding a S/S file,both of the SISControllers have a Data Index equal to zero.When calculating the index of the SISFi Data in the t for Controller 2.the data indices of Controller 1 and Controller 2 are summed t solute index of one. SISController A SISController C Data Index 1 Data Index 1 SISController E SISController D Data Index 1 Data Index 3 SISController F Data Index 2 SISController G SISController H Data Index6 Data Index 1 →Indicates Embeds Figure 2-Data indices with multiple embedded controllers the solute index of the SISDataunit in sIsFileData,for the rres SISController Absolute Index of SISDataunit in SISFileData A A(O)=0 N A(0)+B(1)=1 A(0)+B(1)+C(1)=2 D A(0)+D(3)=3 A(0)+D(3)+E(1)=4 A(0)+D(3)+F(2)=5 A(0)+G(6)=6 H A(0)+G(⑤)+H(1)=7 2.9 Byte ordering All meta-data are stored in little-endian format www.symbian.com
6 SISController currently being considered, are summed. From Figure 1 – Embedding a SIS file, both of the SISControllers have a Data Index equal to zero. When calculating the index of the SISFileData in the SISDataUnit for Controller 2, the data indices of Controller 1 and Controller 2 are summed to get the absolute index of one. SISController A D t I d 0 SISController B Data Index 1 SISController D Data Index 3 SISController G Data Index 6 SISController C Data Index 1 SISController E Data Index 1 SISController H Data Index 1 SISController F Data Index 2 Indicates Embeds Figure 2 – Data indices with multiple embedded controllers The following table indicates the absolute index of the SISDataUnit in SISFileData, for the corresponding controller in the previous diagram. SISController Absolute Index of SISDataUnit in SISFileData A A (0) = 0 B A (0) + B (1) = 1 C A (0) + B (1) + C (1) =2 D A (0) + D (3) = 3 E A (0) + D (3) + E (1) = 4 F A (0) + D (3) + F (2) = 5 G A (0) + G (6) = 6 H A (0) + G (6) + H (1) = 7 2.9 Byte ordering All meta-data are stored in little-endian format
symbian 2.10 Text Character Set The new SIS file format only supports Unicode UCS-2 encoded strings 2.11 File Limitations The number of levels of embedding of SIS controllers/files is limited to eight,as previously covered. Various installation types have been removed.The supported types are now: EInstInstallation /standard type EInstAugmentation /removable addition to a package EInstPartialupgrade /adds files to a package (patch)without any removals EInstPreinstalledApp //for use with pre-installed media EInstPrernstalledPatch //for use with pre-installed media The unsupported types are EInstsIssystem,EInstsIsoption,EInstsIsconfig,EInstsIsPatch, EInstSISMIDlet and EInstSISMIDletsuite. 2.12 SIS File Structure Overview 8r6aBegeeo5ng96eacssFeldspnm0tn5s882a6rogmeg -length-value format All yhs5sneen3aysoressIsFTed5orhesame6esaesioRdneticentos type value for each entry in the array,and so only the Length and Type Length Value 2.12.1.1Type ouneof the d.Each type of hasa unique D details of which The type field is 4 bytes in lenath 2.12.1.2 Length anand des nondetherldd th but would use unnece. ssary space.The Length is always represented by an unsigned value. If Length is smaller than2 then the value is stored using 32 bits Data Lengt which an be presented is1. To read in the 2.12.1.3 Value This field contains the data of the sIsField.Its format depends on the Field ID www.symbian.com
7 2.10 Text Character Set The new SIS file format only supports Unicode UCS-2 encoded strings. 2.11 File Limitations The number of levels of embedding of SIS controllers/files is limited to eight, as previously covered. Various installation types have been removed. The supported types are now: EInstInstallation // standard type EInstAugmentation // removable addition to a package EInstPartialUpgrade // adds files to a package (patch) without any removals EInstPreinstalledApp // for use with pre-installed media EInstPreInstalledPatch // for use with pre-installed media The unsupported types are EInstSISSystem, EInstSISOption, EInstSISConfig, EInstSISPatch, EInstSISMIDlet and EInstSISMIDletSuite. 2.12 SIS File Structure Overview The SIS file format is composed of SISFields encoded using a type-length-value format. All SISFields are stored in this format, with the exception of any SISField which is stored inside a SISArray. This is since an array stores SISFields of the same type, it would be inefficient to store the type value for each entry in the array, and so only the Length and Values are stored. Type Length Value 2.12.1.1 Type This field indicates the type of the SISField. Each type of SISField has a unique ID, details of which can be found in Appendix A. The type field is 4 bytes in length. 2.12.1.2 Length This is the length of the Value field only, and does not include the sizes of the other fields contained in the SISField. The Length field is stored in either 4 or 8 bytes, depending on its value. This is because for some fields we need to support a 64 bit length but for most we don’t, so storing the length in 64 bits for all fields would use unnecessary space. The Length is always represented by an unsigned value. If Length is smaller than 231 then the value is stored using 32 bits. If Length is greater than or equal to 231 then the value is stored using 64 bits. The most significant bit is set to one, meaning the greatest possible Data Length which can be presented is 263 – 1. To read in the value of Data Length we first read in the first 32 bits. If the most significant bit is zero, then the lower 31 bits represent the value of Length. If the most significant bit is one, then we read the next 32 bits, and construct the 63 bit data value from both parts. 2.12.1.3 Value This field contains the data of the SISField. Its format depends on the Field ID
symbian 2.12.1.4Rationale ruct thi 2.12.2 Alignment a 32 bit zero bytes (at the memory.on processors which only allow 32-bit aligned access. 2.12.3 Notation The following notation is used to describe the data-structures used by the SIS file format: Structure Name Name of Field 1 Type of Field Size of Field Name of Field N Type of Field Size of Field 6oernaeByneemeh0teshe6spe6meeeP6gegpoeg8a The Structu name is the name of the str which e field The should appear in the value part of the structure. 3 SIS File Structure e e file escoiCat tai ng 32-bit UIDs and a 32-bit checksum. Symbian File Header SISContents 3.1 File Header Structure Field Name Field Size UID 1 4 Bytes UID2 4 Bytes UID3 4 Bytes UID Checksum 4 Bytes www.symbian.com
8 2.12.1.4 Rationale The reason for this format is that it makes it makes it very easy to construct a C++ class instance from a SISField. It is also possible to construct this instance by giving only the SISField data and no other part of the SIS file. 2.12.2 Alignment The SIS file is padded with zero bytes (at the end of each SISField) where necessary so each SISField begins on a 32 bit word boundary. This is to enable efficient parsing of the format from memory, on processors which only allow 32-bit aligned access. 2.12.3 Notation The following notation is used to describe the data-structures used by the SIS file format: Structure Name Name of Field 1 Type of Field Size of Field … … … Name of Field N Type of Field Size of Field The Structure name is the name of the structure, which determines the ID stored in the type field. The length is determined by the length of all the fields specified. The fields 1 to N, specify the data which should appear in the value part of the structure. 3 SIS File Structure All of the actual data of the SIS file is contained in the SISContents SISField. However Symbian OS uses a header, to associate files with applications. This header is a flat data structure consisting of three 32-bit UIDs and a 32-bit checksum. SISContents Symbian File Header 3.1 File Header Structure Field Name Field Size UID 1 4 Bytes UID 2 4 Bytes UID 3 4 Bytes UID Checksum 4 Bytes
symbian 3.1.1U1D1 This is the UID of the application associated with SIS files.This is always 0x10201A7A. 3.1.2UID2 This UID is reserved for possible future use. 3.1.3UID3 UID3 Thi presentin thesidein the top lvel ssconrer entteoSlseeceemerbeaseg oenotthsUDUDg)sgeneayeneonoerocumentationasthepactageUD.orpUiD 3.1.4 UID Checksum This field provides a checksum of the UID structure in its entirety. 4 SIS Fields 4.1 General SISFields 4.1.1 SISString This SISField contains a UCS-2 encoded Unicode string SISString Length String 4.1.1.1String This field contains the Unicode UCS-2 encoded string.Its length in bytes is specified by the Length field and since each character is encoded using 16 bits there will be half as many characters in the string.as specified by this length. 4.1.2 SISArray The SISArray SISField holds an array of one SISField type.The type of the contained sField.n optim stored. SISArray Length SISField Type TUint32 4 bytes SISField 1 SISField 、 SISField N SISField www.symbian.com
9 3.1.1 UID 1 This is the UID of the application associated with SIS files. This is always 0x10201A7A. 3.1.2 UID 2 This UID is reserved for possible future use. 3.1.3 UID 3 This package UID identifies the SIS file. This UID will uniquely identify the SIS file, except for the case of upgrades, where both SIS files will share the same UID3 This UID should be the same as the UID present in the SISUid SISField in the top level SISController. Note that this UID (UID3) is generally referred-to in other documentation as the package-UID, or pUID for short. 3.1.4 UID Checksum This field provides a checksum of the UID structure in its entirety. 4 SIS Fields 4.1 General SISFields 4.1.1 SISString This SISField contains a UCS-2 encoded Unicode string. SISString Length String 4.1.1.1 String This field contains the Unicode UCS-2 encoded string. Its length in bytes is specified by the Length field, and since each character is encoded using 16 bits there will be half as many characters in the string, as specified by this length. 4.1.2 SISArray The SISArray SISField holds an array of one SISField type. The type of the contained SISFields will be checked on creation from data, and addition of each new SISField. The notation SISArray<SISString> will be used to indicate an array of SISStrings. All of the SISFields in the array are stored without their type as an optimisation, so just the length and value parts of the TLV are stored. SISArray Length SISField Type TUint32 4 bytes SISField 1 SISField … … SISField N SISField
symbian 4.1.2.1 SISField Type 4.1.2.2 SISFields field.The d by reading in all the fields until we have read all the data specified by the Length of the SISArray SISField. 4.1.2.3 Rationale In several places in the SIS file format an array of SISFields is needed,so in order to reduce code duplication a sIsArray type is provided. 4.1.3 SISCompressed This SISField is a wrapper around raw data,where the wrapped data can be optionally compressed This data can be a SISField which allows ea compressed SISString.and SISCompressed Length Compression Algorithm TUint32 4 bytes Uncompressed Data Size TUint64 8 bytes Compressed Data 4.1.3.1 Compression Algorithm This field contains the algorithm used to compress the data for this file TCompressionAlgorithm ECompressNone =0 //The data is uncompressed ECompressDeflate //The data is compressed according to RFC 1951 4.1.3.2 Uncompressed Data Size This field contains the size of the data,when it is uncompressed. 4.1.3.3 Compressed Data This field contains the raw compressed data. 4.1.4 SISVersion This sIsField provides a data structure for the storage of a version number,with major,minor and build components. SISVersion Length Maior TInt32 4 bytes Minor TInt32 4 bytes Build TInt32 4 bytes 10 www.symbian.com
10 4.1.2.1 SISField Type This field indicates the type of the SISFields in the array. All of the fields are of the same type and this will be checked on creation of the SISField from data, and addition of each new SISField. 4.1.2.2 SISFields This is a sequence of SISFields, whose type is equal to the value of the SISField type field. The SISField is only partially stored, the type being left out, as an optimisation since it can be determined from the SISField Type field of the SISArray. The number of fields can be determined by reading in all the fields until we have read all the data specified by the Length of the SISArray SISField. 4.1.2.3 Rationale In several places in the SIS file format an array of SISFields is needed, so in order to reduce code duplication a SISArray type is provided. 4.1.3 SISCompressed This SISField is a wrapper around raw data, where the wrapped data can be optionally compressed. This data can be a SISField which allows easy integration of compression into the SIS file format. The notation SISCompressed<SISString> will be used to indicate a compressed SISString, and SISCompressed<Raw Data> for compressed raw data. SISCompressed Length Compression Algorithm TUint32 4 bytes Uncompressed Data Size TUint64 8 bytes Compressed Data 4.1.3.1 Compression Algorithm This field contains the algorithm used to compress the data for this file. enum TCompressionAlgorithm { ECompressNone = 0, //The data is uncompressed ECompressDeflate //The data is compressed according to RFC 1951 }; 4.1.3.2 Uncompressed Data Size This field contains the size of the data, when it is uncompressed. 4.1.3.3 Compressed Data This field contains the raw compressed data. 4.1.4 SISVersion This SISField provides a data structure for the storage of a version number, with major, minor and build components. SISVersion Length Major TInt32 4 bytes Minor TInt32 4 bytes Build TInt32 4 bytes