secureswitools/swisistools/source/interpretsislib/sisfile.cpp
branchRCL_3
changeset 17 741e5bba2bd1
parent 12 7ca52d38f8c3
child 24 5cc91383ab1e
--- a/secureswitools/swisistools/source/interpretsislib/sisfile.cpp	Tue Apr 27 16:46:15 2010 +0300
+++ b/secureswitools/swisistools/source/interpretsislib/sisfile.cpp	Tue May 11 16:20:28 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -169,7 +169,7 @@
 }
 
 void SisFile::CheckValid() const
-	{
+{
 	std::string error;
 
 	CSISInfo::TSISInstallationType installType = iContents.Controller().SISInfo().InstallationType();
@@ -198,11 +198,26 @@
 	failed = failed || !success;
 
 	const CSISInstallBlock& blk = iContents.Controller().InstallBlock();
+	success = ProcessInstallOptionsWarning( blk, error);
 
-	int fileCount = blk.FileCount();
+	failed = failed || !success;
+
+	if (failed)
+		{
+		std::string x;
+		throw InvalidSis(Ucs2ToUtf8(this->GetPackageName(),x),
+			error, SIS_NOT_SUPPORTED);
+		}
+	}
+
+bool SisFile::ProcessInstallOptionsWarning(const CSISInstallBlock& aInstallBlock, std::string& aError)
+	{
+	bool success = true;
+
+	int fileCount = aInstallBlock.FileCount();
 	for(int i = 0; i < fileCount; ++i)
 		{
-		const CSISFileDescription& fD = blk.FileDescription(i);
+		const CSISFileDescription& fD = aInstallBlock.FileDescription(i);
         const CSISFileDescription::TSISFileOperation operation = fD.Operation();
 		std::wstring target(fD.Target().GetString());
         //
@@ -257,19 +272,12 @@
 		//
         if (!success)
     		{
-			error += "SIS File contains install options : "+operation;
+			aError += "SIS File contains install options : "+operation;
 			break;
 	    	}
 		}
-	failed = failed || !success;
+	}
 
-	if (failed)
-		{
-		std::string x;
-		throw InvalidSis(Ucs2ToUtf8(this->GetPackageName(),x),
-			error, SIS_NOT_SUPPORTED);
-		}
-	}
 
 std::wstring SisFile::GetVendorName() const
 	{
@@ -458,6 +466,18 @@
 	return pkgs;
 }
 
+void SisFile::ProcessEmbeddedFileWarning(const CSISInstallBlock& aInstallBlock) const
+	{
+	TControllerMap embeddedCtls;
+	aInstallBlock.GetEmbeddedControllers(embeddedCtls, false);
+	for (TControllerMapConstIter iter = embeddedCtls.begin(); iter != embeddedCtls.end(); ++iter)
+		{
+		const CSISController* ctrl = iter->second;
+		const CSISInfo& info = ctrl->SISInfo();			
+		LWARN(L" Embedded Package not installed: UID " << std::hex << info.UID1() );
+		}
+	}
+
 bool SisFile::IsSupportedLanguage(TUint32 aLanguage) const
 {
 	bool result = false;