phonebookui/Phonebook/Engine/src/CPbkVcardParameters.cpp
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 02 Feb 2010 10:12:17 +0200
changeset 0 e686773b3f54
permissions -rw-r--r--
Revision: 201003 Kit: 201005

/*
* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description: 
*		Phonebook vCard parameters
*
*/


// INCLUDE FILES
#include "CPbkVcardParameters.h"
#include <barsread.h>


// ==================== MEMBER FUNCTIONS ====================

CPbkVcardParameters* CPbkVcardParameters::NewL(TResourceReader& aReader)
    {
    CPbkVcardParameters* self = new(ELeave) CPbkVcardParameters;
    CleanupStack::PushL(self);
    self->ConstructL(aReader);
    CleanupStack::Pop(self);
    return self;    
    }

CPbkVcardParameters::CPbkVcardParameters()
    {
    }

void CPbkVcardParameters::ConstructL(TResourceReader& aReader)
    {
	TInt count=aReader.ReadInt16();
	while (count-- > 0)
		{
        User::LeaveIfError(iParameters.Append(TUid::Uid(aReader.ReadInt32())));
        }
    }

CPbkVcardParameters::~CPbkVcardParameters()
    {
    iParameters.Close();
    }

TInt CPbkVcardParameters::ParameterCount() const
    {
    return iParameters.Count();    
    }

TUid CPbkVcardParameters::ParameterAt(TInt aIndex) const
    {
    return iParameters[aIndex];     
    }


// End of File