phonebookengines/VirtualPhonebook/VPbkVCardEng/src/CVPbkVCardAttributeHandler.cpp
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 02 Feb 2010 10:12:17 +0200
changeset 0 e686773b3f54
child 21 9da50d567e3c
permissions -rw-r--r--
Revision: 201003 Kit: 201005

/*
* Copyright (c) 2006-2007 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:  Virtual Phonebook VCard attribute handler
*
*/


#include "CVPbkVCardAttributeHandler.h"
#include <CVPbkDefaultAttribute.h>


CVPbkVCardAttributeHandler::CVPbkVCardAttributeHandler()
    {
    // do nothing
    }

CVPbkVCardAttributeHandler* CVPbkVCardAttributeHandler::NewL()
    {
    CVPbkVCardAttributeHandler* self = new (ELeave) CVPbkVCardAttributeHandler();
    return self;
    }
    
CVPbkVCardAttributeHandler::~CVPbkVCardAttributeHandler()
    {
    delete iAttribute;
    }    
    
TBool CVPbkVCardAttributeHandler::CreateAttributeL(TVPbkFieldTypeParameter aParameter)
    {
    TBool retval(EFalse);
    delete iAttribute;
    iAttribute = NULL;
    if (aParameter == EVPbkVersitParamPREF)
        {
        iAttribute = CVPbkDefaultAttribute::NewL(EVPbkDefaultTypePhoneNumber);
        retval = ETrue;
        }
    return retval;
    }
    
MVPbkContactAttribute* CVPbkVCardAttributeHandler::Attribute() const
    {
    return iAttribute;
    }
    
// End of file