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