55 ECertificates, // Exracts all the certificates present in the SIS. |
55 ECertificates, // Exracts all the certificates present in the SIS. |
56 EBaseFiles, // Extract all files present in the SIS (excluding files of embedded SIS) |
56 EBaseFiles, // Extract all files present in the SIS (excluding files of embedded SIS) |
57 EAllDataFiles, // Extract all files including those present in the embedded SIS. |
57 EAllDataFiles, // Extract all files including those present in the embedded SIS. |
58 EAllButCerts, // EAllFiles + Embedded SIS files and their packages |
58 EAllButCerts, // EAllFiles + Embedded SIS files and their packages |
59 EEverything, // EAllButCerts + certificates |
59 EEverything, // EAllButCerts + certificates |
|
60 EIbyFiles // EAllButCerts + certificates +IBY files |
60 }; |
61 }; |
61 public: |
62 public: |
62 /** |
63 /** |
63 * Constructor will take sis file name as input. It will load the file |
64 * Constructor will take sis file name as input. It will load the file |
64 * in memory for future operation. In case of an invalid SIS the |
65 * in memory for future operation. In case of an invalid SIS the |
65 * constructor will throw an exception. |
66 * constructor will throw an exception. |
66 */ |
67 */ |
67 explicit CDumpSis(const std::wstring& aSISFileName, bool aVerbose = false); |
68 explicit CDumpSis(const std::wstring& aSISFileName, bool aVerbose = false, bool aCompatible = false); |
68 /** |
69 /** |
69 * Desctructor. Will delete or free the owned resources. |
70 * Desctructor. Will delete or free the owned resources. |
70 */ |
71 */ |
71 ~CDumpSis(); |
72 ~CDumpSis(); |
72 |
73 |
75 * This function will create the package file for the SIS file. |
76 * This function will create the package file for the SIS file. |
76 * @param Name of the package file to be created. |
77 * @param Name of the package file to be created. |
77 */ |
78 */ |
78 void CreatePackage(const std::wstring& aPkgFileName); |
79 void CreatePackage(const std::wstring& aPkgFileName); |
79 /** |
80 /** |
|
81 * This function will create the iby file for the SIS file. |
|
82 * @param Name of the iby file to be created. |
|
83 */ |
|
84 void CreateIbyFile(const std::wstring& aIbyFileName); |
|
85 /** |
80 * This function will generate package file for a specific controller. |
86 * This function will generate package file for a specific controller. |
81 * @param aSisController controller for which the package file needs to be generated. |
87 * @param aSisController controller for which the package file needs to be generated. |
82 * @param aPkgFileName Name of the package file to be created. |
88 * @param aPkgFileName Name of the package file to be created. |
83 */ |
89 */ |
84 void CreatePackage(const CSISController& aSisController, const std::wstring& aPkgFileName); |
90 void CreatePackage(const CSISController& aSisController, const std::wstring& aPkgFileName); |
|
91 /** |
|
92 * This function will generate iby file for a specific controller. |
|
93 * @param aSisController controller for which the iby file needs to be generated. |
|
94 * @param aIbyFileName Name of the iby file to be created. |
|
95 */ |
|
96 void CreateIbyFile(const CSISController& aSisController, const std::wstring& aIbyFileName); |
|
97 |
85 /** |
98 /** |
86 * This will extract contents of the SIS file based on the extraction level provided. |
99 * This will extract contents of the SIS file based on the extraction level provided. |
87 * Please refer TExtractionLevel for details. |
100 * Please refer TExtractionLevel for details. |
88 * @param aTargetDir Directory to which the contents to be extracted. |
101 * @param aTargetDir Directory to which the contents to be extracted. |
89 * @param aLevel Tells the function how much content needs to be extracted. |
102 * @param aLevel Tells the function how much content needs to be extracted. |
99 /** |
112 /** |
100 * Extract the package to a specified directory. |
113 * Extract the package to a specified directory. |
101 * @param aTargetDir Directory to which the package file needs to be extracted. |
114 * @param aTargetDir Directory to which the package file needs to be extracted. |
102 */ |
115 */ |
103 void ExtractBasePackageFile(const std::wstring& aTargetDir); |
116 void ExtractBasePackageFile(const std::wstring& aTargetDir); |
|
117 /** |
|
118 * Extract the iby file to a specified directory. |
|
119 * @param aTargetDir Directory to which the iby file needs to be extracted. |
|
120 */ |
|
121 void ExtractIBYFile(const std::wstring& aTargetDir); |
104 /** |
122 /** |
105 * Extract all the certificate chains present in the sis file. |
123 * Extract all the certificate chains present in the sis file. |
106 * @param aTargetDir Destination folder. |
124 * @param aTargetDir Destination folder. |
107 */ |
125 */ |
108 void ExtractAllCertificates(const std::wstring& aTargetDir); |
126 void ExtractAllCertificates(const std::wstring& aTargetDir); |
121 |
139 |
122 private: |
140 private: |
123 void CreateTargetDir(std::wstring& aTargetDir); |
141 void CreateTargetDir(std::wstring& aTargetDir); |
124 void CreateDirectoriesRecursively(std::wstring aTargetDir); |
142 void CreateDirectoriesRecursively(std::wstring aTargetDir); |
125 void SisFileNameToPkgFileName(std::wstring& aFileName); |
143 void SisFileNameToPkgFileName(std::wstring& aFileName); |
|
144 void SisFileNameToIbyFileName(std::wstring& aFileName); |
126 void CreateEmbeddedSis(const std::wstring& aFileName, CSISController& aController, int aStart, int aEnd); |
145 void CreateEmbeddedSis(const std::wstring& aFileName, CSISController& aController, int aStart, int aEnd); |
127 void ExtractNestedSisFile( const std::wstring& aTargetDir, |
146 void ExtractNestedSisFile( const std::wstring& aTargetDir, |
128 const CSISController& aController, |
147 const CSISController& aController, |
129 bool aExtractSis, |
148 bool aExtractSis, |
130 int aStartIndex, |
149 int aStartIndex, |
137 private: //Private Member Variables |
156 private: //Private Member Variables |
138 CSISContents iSisContents; |
157 CSISContents iSisContents; |
139 CSISController* iController; |
158 CSISController* iController; |
140 std::wstring iSisFileName; |
159 std::wstring iSisFileName; |
141 TBool iVerbose; |
160 TBool iVerbose; |
|
161 TBool iCompatible; |
142 TBool iIsStub; |
162 TBool iIsStub; |
143 }; |
163 }; |
144 |
164 |
145 #endif // __DUMPSIS_H__ |
165 #endif // __DUMPSIS_H__ |