phonebookui/Phonebook/Engine/src/CPbkVcardParameters.cpp
changeset 0 e686773b3f54
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 /*
       
     2 * Copyright (c) 2002 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 "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 *		Phonebook vCard parameters
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 // INCLUDE FILES
       
    21 #include "CPbkVcardParameters.h"
       
    22 #include <barsread.h>
       
    23 
       
    24 
       
    25 // ==================== MEMBER FUNCTIONS ====================
       
    26 
       
    27 CPbkVcardParameters* CPbkVcardParameters::NewL(TResourceReader& aReader)
       
    28     {
       
    29     CPbkVcardParameters* self = new(ELeave) CPbkVcardParameters;
       
    30     CleanupStack::PushL(self);
       
    31     self->ConstructL(aReader);
       
    32     CleanupStack::Pop(self);
       
    33     return self;    
       
    34     }
       
    35 
       
    36 CPbkVcardParameters::CPbkVcardParameters()
       
    37     {
       
    38     }
       
    39 
       
    40 void CPbkVcardParameters::ConstructL(TResourceReader& aReader)
       
    41     {
       
    42 	TInt count=aReader.ReadInt16();
       
    43 	while (count-- > 0)
       
    44 		{
       
    45         User::LeaveIfError(iParameters.Append(TUid::Uid(aReader.ReadInt32())));
       
    46         }
       
    47     }
       
    48 
       
    49 CPbkVcardParameters::~CPbkVcardParameters()
       
    50     {
       
    51     iParameters.Close();
       
    52     }
       
    53 
       
    54 TInt CPbkVcardParameters::ParameterCount() const
       
    55     {
       
    56     return iParameters.Count();    
       
    57     }
       
    58 
       
    59 TUid CPbkVcardParameters::ParameterAt(TInt aIndex) const
       
    60     {
       
    61     return iParameters[aIndex];     
       
    62     }
       
    63 
       
    64 
       
    65 // End of File