phonebookengines/VirtualPhonebook/VPbkVCardEng/src/CVPbkVCardAttributeHandler.cpp
changeset 0 e686773b3f54
child 68 9da50d567e3c
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 /*
       
     2 * Copyright (c) 2006-2007 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:  Virtual Phonebook VCard attribute handler
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "CVPbkVCardAttributeHandler.h"
       
    20 #include <CVPbkDefaultAttribute.h>
       
    21 
       
    22 
       
    23 CVPbkVCardAttributeHandler::CVPbkVCardAttributeHandler()
       
    24     {
       
    25     // do nothing
       
    26     }
       
    27 
       
    28 CVPbkVCardAttributeHandler* CVPbkVCardAttributeHandler::NewL()
       
    29     {
       
    30     CVPbkVCardAttributeHandler* self = new (ELeave) CVPbkVCardAttributeHandler();
       
    31     return self;
       
    32     }
       
    33     
       
    34 CVPbkVCardAttributeHandler::~CVPbkVCardAttributeHandler()
       
    35     {
       
    36     delete iAttribute;
       
    37     }    
       
    38     
       
    39 TBool CVPbkVCardAttributeHandler::CreateAttributeL(TVPbkFieldTypeParameter aParameter)
       
    40     {
       
    41     TBool retval(EFalse);
       
    42     delete iAttribute;
       
    43     iAttribute = NULL;
       
    44     if (aParameter == EVPbkVersitParamPREF)
       
    45         {
       
    46         iAttribute = CVPbkDefaultAttribute::NewL(EVPbkDefaultTypePhoneNumber);
       
    47         retval = ETrue;
       
    48         }
       
    49     return retval;
       
    50     }
       
    51     
       
    52 MVPbkContactAttribute* CVPbkVCardAttributeHandler::Attribute() const
       
    53     {
       
    54     return iAttribute;
       
    55     }
       
    56     
       
    57 // End of file