phonebookengines/VirtualPhonebook/VPbkEng/src/CVPbkDefaultAttribute.cpp
branchRCL_3
changeset 20 f4a778e096c2
parent 0 e686773b3f54
equal deleted inserted replaced
19:5b6f26637ad3 20:f4a778e096c2
       
     1 /*
       
     2 * Copyright (c) 2002-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:  
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDE FILES
       
    20 #include "CVPbkDefaultAttribute.h"
       
    21 
       
    22 CVPbkDefaultAttribute::CVPbkDefaultAttribute() :   
       
    23         iDefaultType(EVPbkDefaultTypeUndefined)
       
    24     {    
       
    25     }
       
    26     
       
    27 EXPORT_C CVPbkDefaultAttribute* CVPbkDefaultAttribute::NewL(
       
    28         TVPbkDefaultType aType)
       
    29     {
       
    30     CVPbkDefaultAttribute* self = new(ELeave) CVPbkDefaultAttribute();
       
    31     self->SetDefaultType(aType);
       
    32     return self;
       
    33     }
       
    34     
       
    35 EXPORT_C CVPbkDefaultAttribute* CVPbkDefaultAttribute::NewL()
       
    36     {
       
    37     CVPbkDefaultAttribute* self = new(ELeave) CVPbkDefaultAttribute();
       
    38     return self;
       
    39     }    
       
    40 
       
    41 CVPbkDefaultAttribute::~CVPbkDefaultAttribute()
       
    42     {    
       
    43     }
       
    44     
       
    45 EXPORT_C void CVPbkDefaultAttribute::SetDefaultType(TVPbkDefaultType aType)
       
    46     {
       
    47     iDefaultType = aType;
       
    48     }
       
    49     
       
    50 EXPORT_C TVPbkDefaultType CVPbkDefaultAttribute::DefaultType() const
       
    51     {
       
    52     return iDefaultType;
       
    53     }
       
    54         
       
    55 TUid CVPbkDefaultAttribute::AttributeType() const
       
    56     {
       
    57     return CVPbkDefaultAttribute::Uid();
       
    58     }
       
    59     
       
    60 MVPbkContactAttribute* CVPbkDefaultAttribute::CloneLC() const
       
    61     {
       
    62     CVPbkDefaultAttribute* clone = 
       
    63         CVPbkDefaultAttribute::NewL(DefaultType());
       
    64     CleanupStack::PushL(clone);
       
    65     return clone;    
       
    66     }
       
    67 
       
    68 // End of file
       
    69