phonebookui/Phonebook/View/src/PbkFieldFormatterFactory.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 Field formatter factory.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 // INCLUDE FILES
       
    21 #include "PbkFieldFormatterFactory.h"
       
    22 #include "CPbkNumberGroupingFormatter.h"
       
    23 #include "CPbkPhoneNumberDefaultFormatter.h"
       
    24 
       
    25 #include <featmgr.h>
       
    26 #include <bldvariant.hrh>
       
    27 
       
    28 // ==================== MEMBER FUNCTIONS ====================
       
    29 
       
    30 MPbkPhoneNumberFormat* PbkFieldFormatterFactory::CreatePhoneNumberFormatterL
       
    31         (TInt aMaxPhoneNumberDisplayLength)
       
    32     {
       
    33     MPbkPhoneNumberFormat* ret = NULL;
       
    34     if (FeatureManager::FeatureSupported(KFeatureIdPhoneNumberGrouping))
       
    35         {
       
    36         ret = CPbkNumberGroupingFormatter::NewL(aMaxPhoneNumberDisplayLength);
       
    37         }
       
    38     else
       
    39         {
       
    40 	    ret = CPbkPhoneNumberDefaultFormatter::NewL(aMaxPhoneNumberDisplayLength);
       
    41         }
       
    42     return ret;
       
    43     }
       
    44 
       
    45 // End of File