phonebookui/Phonebook/View/inc/MPbkPhoneNumberFormat.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 19 Feb 2010 22:40:27 +0200
branchRCL_3
changeset 3 04ab22b956c2
parent 0 e686773b3f54
permissions -rw-r--r--
Revision: 201003 Kit: 201007

/*
* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description: 
*     Phonebook phone number formatting interface.
*
*/


#ifndef __MPbkPhoneNumberFormat_H__
#define __MPbkPhoneNumberFormat_H__

//  INCLUDES
#include <e32base.h>

// CLASS DECLARATION

/**
 * Phonebook phone number formatting interface.
 *
 * @see PbkFieldFormatterFactory::CreatePhoneNumberFormatterL
 */
class MPbkPhoneNumberFormat
    {
    public:
        /**
         * Virtual destructor.
         */
        virtual ~MPbkPhoneNumberFormat()
			{
			}

		/**
		 * Sets formatting buffer capacity. Ensures that 
		 * FormatPhoneNumberForDisplay is able to format a phone number of 
		 * length aMaxLength.
		 *
		 * @param aMaxLength	length of the phone number to be formatted.
		 */
		virtual void SetMaxBufferLengthL(TInt aMaxLength) =0;

        /**
         * Formats phone number for display. The formatting is done on 
         * best-effort basis. If there is insufficient memory to perform the
         * formatting the original phone number may be returned.
         *
         * @param aOriginalPhoneNumber  the phone number to format.
         * @return  the formatted phone number. The return value is valid until
         *          this function is called again.
         */
        virtual TPtrC FormatPhoneNumberForDisplay
            (const TDesC& aOriginalPhoneNumber) =0;
    };

#endif // __MPbkPhoneNumberFormat_H__

// End of File