secureswitools/swisistools/source/sisxlibrary/siscontroller.h
changeset 0 ba25891c3a9e
child 26 04d4a7bbc3e0
equal deleted inserted replaced
-1:000000000000 0:ba25891c3a9e
       
     1 /*
       
     2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the License "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 * As specified in SGL.GT0188.251
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 /**
       
    21  @file 
       
    22  @internalComponent
       
    23  @released
       
    24 */
       
    25 
       
    26 #ifndef __SISCONTROLLER_H__
       
    27 #define __SISCONTROLLER_H__
       
    28 
       
    29 
       
    30 #include "sisinfo.h"
       
    31 #include "sissupportedoptions.h"
       
    32 #include "sissupportedlanguages.h"
       
    33 #include "sisprerequisites.h"
       
    34 #include "sisproperties.h"
       
    35 #include "sislogo.h"
       
    36 #include "sisinstallblock.h"
       
    37 #include "signaturecertchaindata.h"
       
    38 #include "sisdataindex.h"
       
    39 #include "sequence.h"
       
    40 #include "version.h"
       
    41 
       
    42 
       
    43 class CSISController : public CStructure <CSISFieldRoot::ESISController>
       
    44 	{
       
    45 public:
       
    46 	typedef CSequence <CSignatureCertChainData, CSISFieldRoot::ESISSignatureCertificateChain> SignatureCertChainList;
       
    47 
       
    48 public:
       
    49 	/**
       
    50 	 * Default controller
       
    51 	 */
       
    52 	CSISController ();
       
    53 	/**
       
    54 	 * Copy constructor
       
    55 	 */
       
    56 	CSISController (const CSISController& aInitialiser);
       
    57 	
       
    58 public:
       
    59 	/**
       
    60 	 * This function verifies the structure
       
    61 	 * @param aLanguage - language
       
    62 	 */ 
       
    63 	virtual void Verify (const TUint32 aLanguages) const;
       
    64 	/**
       
    65 	 * Reads the file and internalize the content
       
    66 	 * @param aFile Stream which contains the controller.
       
    67 	 * @param aContainerSize controller size.
       
    68 	 * @param aArrayType type of array. ESISUndefined if it is not an array.
       
    69 	 */ 
       
    70 	virtual void Read (TSISStream& aFile, const CSISFieldRoot::TFieldSize& aContainerSize, const CSISFieldRoot::TFieldType aArrayType = CSISFieldRoot::ESISUndefined);
       
    71 	/**
       
    72 	 * Write the content of the controller into the file.
       
    73 	 * @param aFile Stream where the content needs to be written.
       
    74 	 * @param aIsArrayElement bool which checks if the controller is part of an array.
       
    75 	 */
       
    76 	virtual void Write (TSISStream& aFile, const bool aIsArrayElement) const;
       
    77 	/**
       
    78 	 * @return name of the class.
       
    79 	 */
       
    80 	virtual std::string Name () const;
       
    81 	/**
       
    82 	Loads the Stub SIS Controller file. This function also checks if the file is a valid 
       
    83 	Stub SIS Controller. 
       
    84 	To ensure that the file reading should start from the length field of controller block 
       
    85 	in the  read default type parameter is passed as CSISFieldRoot::ESISController
       
    86 
       
    87 	@param aFileName	Stub SIS Controller file name
       
    88 	*/
       
    89 	void Load (const std::wstring& aFileName);
       
    90 	/**
       
    91 	 * Add a new language to the controller.
       
    92 	 * @param aLan - language to be added.
       
    93 	 */ 
       
    94 	void AddLanguage (const CSISLanguage::TDialect aLan);
       
    95 	/**
       
    96 	 * @return total number of languages present in the controller.
       
    97 	 */
       
    98 	TUint32 LanguageCount () const;
       
    99 	/**
       
   100 	 * Checks whether there are any langauge specified for the controller.
       
   101 	 * @return true if language is specified else false.
       
   102 	 */ 
       
   103 	bool AreLanguagesSpecified () const;
       
   104 	/**
       
   105 	 * Adds a new property into the controller.
       
   106 	 * @param aKey - key of the property
       
   107 	 * @param aValue - Value for the corresponding key
       
   108 	 */
       
   109 	void AddProperty (const CSISProperty::TKey aKey, const CSISProperty::TValue aValue);
       
   110 	/**
       
   111 	 * @return UID of the SIS file.
       
   112 	 */
       
   113 	CSISUid::TUid UID1 () const;
       
   114 	/**
       
   115 	 * Set the UID for the controller.
       
   116 	 * @param aUID new UID for the SIS.
       
   117 	 */
       
   118 	void SetUID (const CSISUid::TUid aUID);
       
   119 	/**
       
   120 	 * Add package name to the existing list of package names for the controller.
       
   121 	 * @param aPackageName - package name
       
   122 	 */ 
       
   123 	void AddName (const std::wstring& aLan)	;
       
   124 	/**
       
   125 	 * Add vendor name to the existing list of vendor names for the controller.
       
   126 	 * @param aVendorName vendor name.
       
   127 	 */
       
   128 	void AddVendorName (const std::wstring& aLan);
       
   129 	/**
       
   130 	 * Set the unique vendor name for the controller.
       
   131 	 * @param VendorUniqueName unique vendor name.
       
   132 	 */
       
   133 	void SetVendorUniqueName (const std::wstring& aVendorUniqueName);
       
   134 	/**
       
   135 	 * Set SIS version
       
   136 	 * @param aVersion new version to be set.
       
   137 	 */
       
   138 	void SetVersion (const TVersion& aVersion);
       
   139 	/**
       
   140 	 * Each SIS has n number of package dependencies and each package dependency 
       
   141 	 * has m number of dependency names, where n & m >= 0. 
       
   142 	 * This function will add the dependency name to the existing list of 
       
   143 	 * names of the last package dependency.
       
   144 	 * @param aName new dependency name
       
   145 	 */
       
   146 	void AddDependencyName (const std::wstring& aName);
       
   147 	/**
       
   148 	 * Add a new package dependency into the list of existing package dependencies.
       
   149 	 * @param aUID - UID of the package
       
   150 	 * @param aFrom - From version 
       
   151 	 * @param aTo - To version
       
   152 	 */ 
       
   153 	void AddDependency (const CSISUid::TUid aUID, const TVersion& aFrom, const TVersion& aTo);
       
   154 	/**
       
   155 	 * Each SIS has n number of target dependencies and each target dependency 
       
   156 	 * has m number of target dependency names, where n & m >= 0. 
       
   157 	 * This function will add the target dependency name to the existing list of 
       
   158 	 * names of the last target dependency.
       
   159 	 * @param aName new target dependency name
       
   160 	 */
       
   161 	void AddTargetName (const std::wstring& aName);
       
   162 	/**
       
   163 	 * Add a new target dependency into the list of existing tergate dependencies.
       
   164 	 * @param aUID - UID of the target
       
   165 	 * @param aFrom - From version 
       
   166 	 * @param aTo - To version
       
   167 	 */ 
       
   168 	void AddTarget (const CSISUid::TUid aUID, const TVersion& aFrom, const TVersion& aTo);
       
   169 	/**
       
   170 	 * Add new option name to the last supported option.
       
   171 	 * @param aName option name
       
   172 	 */
       
   173 	void AddOptionName (const std::wstring& aName);
       
   174 	/**
       
   175 	 * Creates a new object of supported options and pushes it into the existing list.
       
   176 	 */
       
   177 	void AddOption ();
       
   178 	/**
       
   179 	 * Adds a new install
       
   180 	 * @param new installation flag.
       
   181 	 */
       
   182 	void AddInstallFlag(const TUint8 aFlag);
       
   183 	/**
       
   184 	 * Converts the string into installation option (only if its valid) and sets the
       
   185 	 * option to last file of controller's installblock.
       
   186 	 * @param aOption installation option string.
       
   187 	 * @return returns the installation option
       
   188 	 */
       
   189 	CSISFileDescription::TSISInstOption InterpretOption (const std::wstring& aOption);
       
   190 	/**
       
   191 	 * Converts the string into installation type (only if its valid) and sets the
       
   192 	 * type to controller.
       
   193 	 * @param aOption installation type string.
       
   194 	 * @return returns the installation type.
       
   195 	 */
       
   196 	CSISInfo::TSISInstallationType InterpretType (const std::wstring& aOption);
       
   197 	/**
       
   198 	 * Only preinstalled apps must be compressed. 
       
   199 	 * @return false if the sis is preinstalled app or preinstalled patch, else true
       
   200 	 */
       
   201 	bool MustRejectCompression () const;
       
   202 	/**
       
   203 	 * Set MIME type of the last file of the base controller's install block.
       
   204 	 * @param aMimeType MIME type
       
   205 	 */
       
   206 	void SetMimeType (const std::wstring& aMimeType);
       
   207 	/**
       
   208 	 * Add a new CSISIf object to the existing list in the controller's installblock.
       
   209 	 */
       
   210 	void AddIf ();
       
   211 	/**
       
   212 	 * @return returns the last CSISIf block present in the controller's installblock.
       
   213 	 */
       
   214 	const CSISIf& If () const;
       
   215 	/**
       
   216 	 * @return returns the last CSISIf block present in the controller's installblock.
       
   217 	 */
       
   218 	CSISIf& If ();
       
   219 	/**
       
   220 	 * @return install block of the controller.
       
   221 	 */
       
   222 	const CSISInstallBlock& InstallBlock () const;
       
   223 	/**
       
   224 	 * @return install block of the controller.
       
   225 	 */
       
   226 	CSISInstallBlock& InstallBlock ();
       
   227 	/**
       
   228 	 * Sets the controller's data index.
       
   229 	 * @param aIndex new index of the controller
       
   230 	 */
       
   231 	void SetDataIndex (const TUint32 aIndex);
       
   232 	/**
       
   233 	 * @return data unit index of the controller
       
   234 	 */
       
   235 	TUint32 DataIndex () const;
       
   236 	/**
       
   237 	 * Sets the logo into the base controller
       
   238 	 * @param aMime MIME type of the logo file.
       
   239 	 * @param aTarget destination for the logo file.
       
   240 	 * @param aFileName file name of the logo file.
       
   241 	 * @param aDataUnit data unit where the logo file will be added
       
   242 	 */
       
   243 	void SetLogo (const std::wstring& aMime, const std::wstring& aTarget, const TUint32 aFileIndex, const CSISDataUnit& aDataUnit);
       
   244 	/**
       
   245 	 * Retrieves the instance of logo class
       
   246 	 */
       
   247 	inline const CSISLogo& Logo() const;
       
   248 	/**
       
   249 	 * Embeds the SIS file into the controller.
       
   250 	 * @param aEmbed Controller to be embedded
       
   251 	 * @param aIndex reserved for future use
       
   252 	 */
       
   253 	void Embed (class CSISController& aEmbed, const TUint32 aIndex);
       
   254 	/**
       
   255 	 * Set the compressed and uncompressed sizes of the logo file.
       
   256 	 * @param aCompressedSize compressed size.
       
   257 	 * @param aUncompressedSize uncompressed size.
       
   258 	 */
       
   259 	void SetLogoSizes (const TUint64 aCompressedSize, const TUint64 aUncompressedSize);
       
   260    	/**
       
   261    	 * Retrieves the Language of the controller pointed by language index.
       
   262    	 * @param aIndex language index
       
   263    	 * @return language
       
   264    	 */
       
   265 	CSISLanguage::TLanguage Language (const TUint32 aIndex) const;
       
   266 	/**
       
   267 	 * Set the current time as the sis creation time.
       
   268 	 */
       
   269 	void SetNow ();
       
   270 	/**
       
   271 	 * Removes the most recent signature from the controller.
       
   272 	 */
       
   273 	void RemoveSignature ();
       
   274 	/**
       
   275 	 * Gets the signature count from the controller.
       
   276 	 * @return signature count.
       
   277 	 */
       
   278 	inline int	SignatureCount() const;
       
   279 	/**
       
   280 	 * Returns the buffer containing controller data.
       
   281 	 * @return raw controller buffer.
       
   282 	 */
       
   283 	const TUint8* RawBuffer () const;
       
   284 	/**
       
   285 	 * Buffer size which is actually read. Doesn't include data whose reading is skipped.
       
   286 	 * @return buffer size.
       
   287 	 */
       
   288 	TUint64 BufferSize () const;
       
   289 	/**
       
   290 	 * Raw buffer size. The entire controller size.
       
   291 	 * @return buffer size.
       
   292 	 */
       
   293 	TUint64 RawBufferSize () const;
       
   294 	/**
       
   295 	 * For calculating controller hash signature and data unit index is skipped.
       
   296 	 * This function returns the length of the controller minus signature and data
       
   297 	 * unit length.
       
   298 	 * @return buffer size.
       
   299 	 */
       
   300 	TUint64 ControllerSizeForHash() const;
       
   301 	/**
       
   302 	 * Add a new signature chain into the controller.
       
   303 	 * @param aSISSigCertChain signature chain.
       
   304 	 */
       
   305 	void AddSignatureChain(CSignatureCertChainData& aSISSigCertChain);
       
   306 	/**
       
   307 	 * Adds package entry related to this controller.
       
   308 	 * @param aStream stream into which the package details need to be written.
       
   309 	 * @param aVerbose If this option is set then detail description of pkg
       
   310 	 * 			will be written into the stream.
       
   311 	 */
       
   312 	void AddPackageEntry(std::wostream& aStream, bool aVerbose) const;
       
   313 	/**
       
   314 	 * Retrieves the CSignatureCertChainData pointed by chain index.
       
   315 	 * @param aIndex index of the chain in the controller.
       
   316 	 * @return CSignatureCertChainData object (signature and cert chain container)
       
   317 	 */
       
   318 	inline const CSignatureCertChainData& SignatureCertChain(TUint32 aIndex) const;
       
   319 	/**
       
   320 	 * Prerequisites for this controller
       
   321 	 * @return CSISPrerequisites
       
   322 	 */
       
   323 	inline const CSISPrerequisites& Prerequisites() const;
       
   324 	/**
       
   325 	 * Properties of the controller class.
       
   326 	 * @return CSISProperties
       
   327 	 */
       
   328 	inline const CSISProperties& Properties() const;
       
   329 	/**
       
   330 	 * Retrieves the CSISInfo class which holds the basic information of the sis file.
       
   331 	 * @return CSISInfo
       
   332 	 */
       
   333 	inline const CSISInfo& SISInfo() const;
       
   334 	/**
       
   335 	 * Retrieves the CSISLogo class which holds the log information.
       
   336 	 * @return CSISLogo
       
   337 	 */
       
   338 	inline const CSISLogo& SISLogo() const;
       
   339 	/**
       
   340 	 * Supported option count.
       
   341 	 * @return option count.
       
   342 	 */
       
   343 	inline TUint32 SupportedOptionCount() const;
       
   344 	/**
       
   345 	 * Retrieve controller ID
       
   346 	 */
       
   347 	inline int GetControllerID() const;
       
   348 
       
   349 	/**
       
   350 	 * If this function is called then it will skip reading of some class members
       
   351 	 */
       
   352 	static void SetSkip ();
       
   353 	
       
   354 
       
   355 private:
       
   356 	void InsertMembers ();
       
   357 	int DeleteDirectory (std::string& aDirectory);
       
   358 
       
   359 private:
       
   360 	// change these ? change Read and Write (for SignSIS) :
       
   361 	CSISInfo				iInfo;
       
   362 	CSISSupportedOptions	iSupportedOptions;
       
   363 	CSISSupportedLanguages	iSupportedLanguages;
       
   364 	CSISPrerequisites		iPrerequisites;
       
   365 	CSISProperties			iProperties;
       
   366 	CSISLogo				iLogo;
       
   367 	CSISInstallBlock		iInstallBlock;
       
   368 	SignatureCertChainList	iSignatures;
       
   369 	CSISDataIndex			iDataIndex;
       
   370 	TUint8*					iRawBuffer;
       
   371 	TUint64					iRawBufferSize;
       
   372 	TUint64					iBufferSize;
       
   373 	/**
       
   374 	 * Used distinguish between other embeded controllers.
       
   375 	 * Base controllers ID will be -1 and embedded controllers
       
   376 	 * ID starts with 0
       
   377 	 */
       
   378 	int						iControllerID; 
       
   379 	static int				iLastCtlID; // Last allocated controller's ID.
       
   380 	static bool				iSkip;
       
   381 	};
       
   382 
       
   383 
       
   384 
       
   385 inline CSISController::CSISController () :
       
   386 		iRawBuffer (NULL),
       
   387 		iRawBufferSize(0),
       
   388 		iBufferSize (0),
       
   389 		iLogo (false)
       
   390 	{
       
   391 	InsertMembers ();
       
   392 	}
       
   393 
       
   394 
       
   395 inline void CSISController::AddLanguage (const CSISLanguage::TDialect aLan)	
       
   396 	{ 
       
   397 	iSupportedLanguages.AddLanguage (aLan); 
       
   398 	}
       
   399 
       
   400 
       
   401 inline TUint32 CSISController::LanguageCount () const						
       
   402 	{ 
       
   403 	return iSupportedLanguages.LanguageCount (); 
       
   404 	}
       
   405 
       
   406 
       
   407 inline bool CSISController::AreLanguagesSpecified () const					
       
   408 	{ 
       
   409 	return iSupportedLanguages.AreLanguagesSpecified (); 
       
   410 	}
       
   411 
       
   412 
       
   413 inline void CSISController::AddProperty (const CSISProperty::TKey aKey, const CSISProperty::TValue aValue)
       
   414 	{ 
       
   415 	iProperties.AddProperty (aKey, aValue); 
       
   416 	}
       
   417 
       
   418 
       
   419 inline CSISUid::TUid CSISController::UID1 () const								
       
   420 	{ 
       
   421 	return iInfo.UID1 (); 
       
   422 	}
       
   423 
       
   424 
       
   425 inline void CSISController::SetUID (const CSISUid::TUid aUID)					
       
   426 	{ 
       
   427 	iInfo.SetUID (aUID); 
       
   428 	}
       
   429 
       
   430 
       
   431 inline void CSISController::AddName (const std::wstring& aLan)					
       
   432 	{ 
       
   433 	iInfo.AddName (aLan); 
       
   434 	}
       
   435 
       
   436 
       
   437 inline void CSISController::AddVendorName (const std::wstring& aLan)				
       
   438 	{ 
       
   439 	iInfo.AddVendorName (aLan); 
       
   440 	}
       
   441 
       
   442 
       
   443 inline void CSISController::SetVersion (const TVersion& aVersion)
       
   444 	{ 
       
   445 	iInfo.SetVersion (aVersion); 
       
   446 	}
       
   447 
       
   448 
       
   449 inline void CSISController::AddDependencyName (const std::wstring& aName)			
       
   450 	{ 
       
   451 	iPrerequisites.AddDependencyName (aName); 
       
   452 	}
       
   453 
       
   454 
       
   455 inline void CSISController::AddTargetName (const std::wstring& aName)				
       
   456 	{ 
       
   457 	iPrerequisites.AddTargetName (aName); 
       
   458 	}
       
   459 
       
   460 
       
   461 inline void CSISController::AddOptionName (const std::wstring& aName)				
       
   462 	{ 
       
   463 	iSupportedOptions.AddOptionName (aName); 
       
   464 	}
       
   465 
       
   466 
       
   467 inline void CSISController::AddOption ()										
       
   468 	{ 
       
   469 	iSupportedOptions.AddOption (); 
       
   470 	}
       
   471 
       
   472 
       
   473 inline CSISFileDescription::TSISInstOption CSISController::InterpretOption (const std::wstring& aOption)
       
   474 	{ 
       
   475 	return iInstallBlock.InterpretOption (aOption); 
       
   476 	}
       
   477 
       
   478 
       
   479 inline CSISInfo::TSISInstallationType CSISController::InterpretType (const std::wstring& aOption)
       
   480 	{
       
   481 	return iInfo.InterpretType (aOption); 
       
   482 	}
       
   483 
       
   484 
       
   485 inline bool CSISController::MustRejectCompression () const
       
   486 	{
       
   487 	return iInfo.MustRejectCompression (); 
       
   488 	}
       
   489 
       
   490 
       
   491 inline void CSISController::SetMimeType (const std::wstring& aMimeType)			
       
   492 	{ 
       
   493 	iInstallBlock.SetMimeType (aMimeType); 
       
   494 	}
       
   495 
       
   496 
       
   497 inline void CSISController::AddIf ()												
       
   498 	{ 
       
   499 	iInstallBlock.AddIf (); 
       
   500 	}
       
   501 
       
   502 
       
   503 inline const CSISIf& CSISController::If () const									
       
   504 	{ 
       
   505 	return iInstallBlock.If (); 
       
   506 	}
       
   507 
       
   508 inline CSISIf& CSISController::If ()												
       
   509 	{ 
       
   510 	return iInstallBlock.If (); 
       
   511 	}
       
   512 
       
   513 
       
   514 inline const CSISInstallBlock& CSISController::InstallBlock () const				
       
   515 	{ 
       
   516 	return iInstallBlock; 
       
   517 	}
       
   518 
       
   519 
       
   520 inline CSISInstallBlock& CSISController::InstallBlock ()							
       
   521 	{ 
       
   522 	return iInstallBlock; 
       
   523 	}
       
   524 
       
   525 
       
   526 inline void CSISController::SetDataIndex (const TUint32 aIndex)					
       
   527 	{ 
       
   528 	iDataIndex.SetIndex (aIndex);
       
   529 	}
       
   530 
       
   531 
       
   532 inline TUint32 CSISController::DataIndex () const									
       
   533 	{ 
       
   534 	return iDataIndex.Index ();
       
   535 	}
       
   536 
       
   537 
       
   538 inline void CSISController::SetLogo (const std::wstring& aMime, const std::wstring& aTarget, const TUint32 aFileIndex, const CSISDataUnit& aDataUnit)
       
   539 	{
       
   540 	iLogo.Set (aMime, aTarget, aFileIndex, aDataUnit); 
       
   541 	}
       
   542 
       
   543 inline const CSISLogo& CSISController::Logo() const
       
   544 	{
       
   545 	return iLogo;
       
   546 	}
       
   547 
       
   548 
       
   549 inline void CSISController::AddDependency (const CSISUid::TUid aUID, const TVersion& aFrom, const TVersion& aTo)
       
   550 	{
       
   551 	iPrerequisites.AddDependency (aUID, aFrom, aTo);
       
   552 	}
       
   553 
       
   554 inline void CSISController::AddTarget (const CSISUid::TUid aUID, const TVersion& aFrom, const TVersion& aTo)
       
   555 	{
       
   556 	iPrerequisites.AddTarget (aUID, aFrom, aTo);
       
   557 	}
       
   558 
       
   559 inline void CSISController::Embed (class CSISController& aEmbed, const TUint32 aOffset)
       
   560 	{
       
   561 	iInstallBlock.Embed (aEmbed, aOffset);
       
   562 	}
       
   563 
       
   564 inline void CSISController::SetLogoSizes (const TUint64 aCompressedSize, const TUint64 aUncompressedSize)
       
   565 	{
       
   566 	iLogo.SetSizes (aCompressedSize, aUncompressedSize);
       
   567 	}
       
   568 
       
   569 inline void CSISController::Verify (const TUint32 aLanguages) const
       
   570 	{
       
   571 	CStructure <CSISFieldRoot::ESISController>::Verify (LanguageCount ());
       
   572 #if defined (SIGNSIS)
       
   573 	for (int index = 0; index < iSignatures.size (); index++)
       
   574 		{
       
   575 		
       
   576 		iSignatures [index].VerifySignature (this, PostHeaderPos ());
       
   577 			
       
   578 		}
       
   579 #endif // SIGNSIS
       
   580 	}
       
   581 
       
   582 inline void CSISController::SetVendorUniqueName (const std::wstring& aVendorUniqueName)
       
   583 	{
       
   584 	iInfo.SetVendorUniqueName (aVendorUniqueName);
       
   585 	}
       
   586 
       
   587 inline CSISLanguage::TLanguage CSISController::Language (const TUint32 aIndex) const
       
   588 	{
       
   589 	return iSupportedLanguages.Language (aIndex);
       
   590 	}
       
   591 
       
   592 inline std::string CSISController::Name () const
       
   593 	{
       
   594 	return "Controller";
       
   595 	}
       
   596 
       
   597 inline void CSISController::SetSkip ()
       
   598 	{
       
   599 	iSkip = true;
       
   600 	}
       
   601 
       
   602 inline const TUint8* CSISController::RawBuffer () const
       
   603 	{
       
   604 	assert (iRawBuffer);
       
   605 	return iRawBuffer;
       
   606 	}
       
   607 
       
   608 inline TUint64 CSISController::BufferSize () const
       
   609 	{
       
   610 	assert (iBufferSize);
       
   611 	return iBufferSize;
       
   612 	}
       
   613 
       
   614 inline TUint64 CSISController::RawBufferSize () const
       
   615 	{
       
   616 	assert (iRawBufferSize);
       
   617 	return iRawBufferSize;
       
   618 	}
       
   619 
       
   620 inline void CSISController::AddInstallFlag(const TUint8 aFlag)
       
   621 	{
       
   622 	iInfo.AddFlag(aFlag);
       
   623 	}
       
   624 
       
   625 inline void CSISController::SetNow ()
       
   626 	{
       
   627 	iInfo.SetNow();
       
   628 	}
       
   629 
       
   630 inline int CSISController::SignatureCount () const
       
   631 	{
       
   632 	return iSignatures.size();
       
   633 	}
       
   634 
       
   635 inline const CSignatureCertChainData& CSISController::SignatureCertChain(TUint32 aIndex) const
       
   636 	{
       
   637 	assert(aIndex < iSignatures.size());
       
   638 	return iSignatures[aIndex];
       
   639 	}
       
   640 
       
   641 inline const CSISPrerequisites& CSISController::Prerequisites() const
       
   642 	{
       
   643 	return iPrerequisites;
       
   644 	}
       
   645 
       
   646 inline const CSISProperties& CSISController::Properties() const
       
   647 	{
       
   648 	return iProperties;
       
   649 	}
       
   650 
       
   651 inline const CSISInfo& CSISController::SISInfo() const
       
   652 	{
       
   653 	return iInfo;
       
   654 	}
       
   655 
       
   656 inline const CSISLogo& CSISController::SISLogo() const
       
   657 	{
       
   658 	return iLogo;
       
   659 	}
       
   660 
       
   661 inline TUint32 CSISController::SupportedOptionCount() const
       
   662 	{
       
   663 	return iSupportedOptions.SupportedOptionCount();
       
   664 	}
       
   665 
       
   666 inline int CSISController::GetControllerID() const
       
   667 	{
       
   668 	return iControllerID;
       
   669 	}
       
   670 
       
   671 #endif // __SISCONTROLLER_H__
       
   672