secureswitools/swisistools/source/sisxlibrary/sisproperties.h
changeset 0 ba25891c3a9e
child 26 04d4a7bbc3e0
equal deleted inserted replaced
-1:000000000000 0:ba25891c3a9e
       
     1 /*
       
     2 * Copyright (c) 2004-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 * Note: This file may contain code to generate corrupt files for test purposes.
       
    16 * Such code is excluded from production builds by use of compiler defines;
       
    17 * it is recommended that such code should be removed if this code is ever published publicly.
       
    18 * As specified in SGL.GT0188.251
       
    19 *
       
    20 */
       
    21 
       
    22 
       
    23 /**
       
    24  @file 
       
    25  @internalComponent
       
    26  @released
       
    27 */
       
    28 
       
    29 #ifndef __SISPROPERTIES_H__
       
    30 #define __SISPROPERTIES_H__
       
    31 
       
    32 #include "sisproperty.h"
       
    33 #include "sisarray.h"
       
    34 
       
    35 class CSISProperties : public CStructure <CSISFieldRoot::ESISProperties>
       
    36 
       
    37 	{
       
    38 public:
       
    39 	typedef CSISArray <CSISProperty, CSISFieldRoot::ESISProperty> SISPropertyArray;
       
    40 public:
       
    41 	CSISProperties ();
       
    42 	CSISProperties (const CSISProperties& aInitialiser);
       
    43 
       
    44 	virtual std::string Name () const;
       
    45 
       
    46 	void AddProperty (const TUint32 aKey, const TUint32 aValue);
       
    47 	void AddPackageEntry(std::wostream& aStream, bool aVerbose) const;
       
    48 	inline const SISPropertyArray& Properties() const;
       
    49 
       
    50 private:
       
    51 	SISPropertyArray iProperty;
       
    52 	};
       
    53 
       
    54 
       
    55 
       
    56 
       
    57 inline CSISProperties::CSISProperties ()
       
    58 	{
       
    59 	InsertMember (iProperty); 
       
    60 	}
       
    61 
       
    62 
       
    63 inline CSISProperties::CSISProperties (const CSISProperties& aInitialiser) :
       
    64 		CStructure <CSISFieldRoot::ESISProperties> (aInitialiser),
       
    65 		iProperty (aInitialiser.iProperty)
       
    66 	{
       
    67 	InsertMember (iProperty); 
       
    68 	}
       
    69 
       
    70 
       
    71 inline void CSISProperties::AddProperty (const TUint32 aKey, const TUint32 aValue) 
       
    72 	{ 
       
    73 	iProperty.Push (CSISProperty (aKey, aValue)); 
       
    74 	}
       
    75 
       
    76 
       
    77 inline std::string CSISProperties::Name () const
       
    78 	{
       
    79 	return "Properties";
       
    80 	}
       
    81 
       
    82 inline const CSISProperties::SISPropertyArray& CSISProperties::Properties() const
       
    83 	{
       
    84 	return iProperty;
       
    85 	}
       
    86 
       
    87 
       
    88 #endif // __SISPROPERTIES_H__
       
    89