secureswitools/swisistools/source/sisxlibrary/sisprerequisites.cpp
changeset 0 ba25891c3a9e
child 26 04d4a7bbc3e0
equal deleted inserted replaced
-1:000000000000 0:ba25891c3a9e
       
     1 /*
       
     2 * Copyright (c) 2008-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 *
       
    16 */
       
    17 
       
    18 
       
    19 /**
       
    20  @file 
       
    21  @internalComponent
       
    22  @released
       
    23 */
       
    24 
       
    25 
       
    26 #include "sisprerequisites.h"
       
    27 
       
    28 
       
    29 bool CSISPrerequisites::HasUID (const CSISUid& aUid) const
       
    30 	{
       
    31 	for (	CSISArray<CSISDependency, CSISFieldRoot::ESISDependency>::TMemConIter iter = iDependencies.begin ();
       
    32 			iter != iDependencies.end ();
       
    33 			iter++) 
       
    34 		{
       
    35 		if ((**iter) -> HasUID (aUid))
       
    36 			{
       
    37 			return true;
       
    38 			}
       
    39 		}
       
    40 	return false;
       
    41 	}
       
    42 
       
    43 void CSISPrerequisites::AddPackageEntry(std::wostream& aStream, bool aVerbose) const
       
    44 	{
       
    45 	if (iTargetDevices.size())
       
    46 		{
       
    47 		// Since iTargetDevices and iDependencies are of same type and they
       
    48 		// have different structure in the package (pkg) file we need to set
       
    49 		// 
       
    50 		for(int i = 0; i < iTargetDevices.size(); ++i)
       
    51 			{
       
    52 			iTargetDevices[i].SetDependencyType(CSISDependency::ETargetDependency);
       
    53 			}
       
    54 		
       
    55 		if (aVerbose)
       
    56 			{
       
    57 			aStream << L"; Target dependencies" << std::endl;
       
    58 			}
       
    59 		iTargetDevices.AddPackageEntry(aStream, aVerbose);
       
    60 		}
       
    61 
       
    62 	if (iDependencies.size())
       
    63 		{
       
    64 		if (aVerbose)
       
    65 			{
       
    66 			aStream << L"; Dependencies" << std::endl;
       
    67 			}
       
    68 		iDependencies.AddPackageEntry(aStream, aVerbose);
       
    69 		}
       
    70 	}
       
    71