secureswitools/swianalysistoolkit/source/dumpswiregistrytool/registrypackage.cpp
changeset 0 ba25891c3a9e
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 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "registrypackage.h"
       
    20 
       
    21 RegistryPackage::RegistryPackage()
       
    22 	:iUid (0) ,
       
    23 	iPkgName (0) ,
       
    24 	iVendorName (0) ,
       
    25 	iPkgIndex (0)
       
    26 	{
       
    27 	}
       
    28 
       
    29 void RegistryPackage::ExtractPackage(StreamReader& aReader)  
       
    30 	{
       
    31 	iUid = aReader.ReadInt32(); 
       
    32 	iPkgName = aReader.ReadDescriptor();
       
    33 	iVendorName =  aReader.ReadDescriptor();
       
    34 	iPkgIndex = aReader.ReadInt32();
       
    35 	}
       
    36 
       
    37 void RegistryPackage::DisplayPackage()
       
    38 	{	
       
    39 	cout << "Package UID :" << std::hex << "0x" << iUid << endl;
       
    40 	cout << "Package Name :" << iPkgName << endl;
       
    41 	cout << "Vendor :" << iVendorName << endl;
       
    42 	cout << "Package Index :" << iPkgIndex << endl;
       
    43 	}
       
    44 
       
    45 RegistryPackage::~RegistryPackage()
       
    46 	{
       
    47 	delete [] iPkgName;
       
    48 	delete [] iVendorName;
       
    49 	}