emailcontacts/contactactionservice/inc/CFscDefaultPhoneNumberFormatter.h
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:  Default phone number formatter.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CFSCDEFAULTPHONENUMBERFORMATTER_H
       
    20 #define CFSCDEFAULTPHONENUMBERFORMATTER_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32base.h>
       
    24 #include "MFscPhoneNumberFormatter.h"
       
    25 
       
    26 // CLASS DECLARATION
       
    27 
       
    28 /**
       
    29  * Default phone number formatter.
       
    30  *
       
    31  * Responsible for formatting phone number.
       
    32  */
       
    33 NONSHARABLE_CLASS(CFscDefaultPhoneNumberFormatter) :
       
    34         public CBase,
       
    35         public MFscPhoneNumberFormatter
       
    36     {
       
    37     public: // Construction and destruction
       
    38 
       
    39         /**
       
    40          * Creates a new instance of this class.
       
    41          *
       
    42          * @param aMaxDisplayLength     Maximum phone number display length.
       
    43          * @return  A new instance of this class.
       
    44          */
       
    45         static CFscDefaultPhoneNumberFormatter* NewL(
       
    46                 TInt aMaxDisplayLength );
       
    47 
       
    48         /**
       
    49          * Destructor
       
    50          */
       
    51         virtual ~CFscDefaultPhoneNumberFormatter();
       
    52 
       
    53     public: // From MFscPhoneNumberFormatter
       
    54         void SetMaxBufferLengthL(
       
    55                 TInt aMaxLength );
       
    56         TPtrC FormatPhoneNumberForDisplay(
       
    57                 const TDesC& aOriginalPhoneNumber );
       
    58 
       
    59     private: // Implementation
       
    60         CFscDefaultPhoneNumberFormatter();
       
    61         void ConstructL(
       
    62             TInt aMaxDisplayLength );
       
    63 
       
    64     private: // Data
       
    65         /// Own: Formatting buffer
       
    66         HBufC* iFormatterNumberBuffer;
       
    67     };
       
    68 
       
    69 #endif // CFSCDEFAULTPHONENUMBERFORMATTER_H
       
    70 
       
    71 // End of File