emailcontacts/contactactionservice/src/FscPhoneNumberFormatterFactory.cpp
changeset 0 8466d47a6819
equal deleted inserted replaced
-1:000000000000 0:8466d47a6819
       
     1 /*
       
     2 * Copyright (c) 2008 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:  Implementation of phone number formatter factory.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "emailtrace.h"
       
    20 #include "FscPhoneNumberFormatterFactory.h"
       
    21 
       
    22 #include "CFscNumberGroupingFormatter.h"
       
    23 #include "CFscDefaultPhoneNumberFormatter.h"
       
    24 
       
    25 // System includes
       
    26 #include <featmgr.h>
       
    27 
       
    28 // --------------------------------------------------------------------------
       
    29 // FscPhoneNumberFormatterFactory::CreatePhoneNumberFormatterL
       
    30 // --------------------------------------------------------------------------
       
    31 //
       
    32  MFscPhoneNumberFormatter*
       
    33         FscPhoneNumberFormatterFactory::CreatePhoneNumberFormatterL
       
    34             ( TInt aMaxDisplayLength )
       
    35     {
       
    36 	FUNC_LOG;
       
    37     MFscPhoneNumberFormatter* ret = NULL;
       
    38 
       
    39     if ( FeatureManager::FeatureSupported( KFeatureIdPhoneNumberGrouping ) )
       
    40         {
       
    41         ret = CFscNumberGroupingFormatter::NewL( aMaxDisplayLength );
       
    42         }
       
    43     else
       
    44         {
       
    45         ret = CFscDefaultPhoneNumberFormatter::NewL( aMaxDisplayLength );
       
    46         }
       
    47 
       
    48     return ret;
       
    49     }
       
    50 
       
    51 // End of File
       
    52