phoneclientserver/dialutils/inc/DialUtilsImpl.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 19 Mar 2010 09:40:14 +0200
changeset 12 ae8abd0db65c
parent 0 ff3b6d0fd310
child 44 987c9837762f
permissions -rw-r--r--
Revision: 201007 Kit: 201011

/*
* Copyright (c) 2004-2005 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:  Provides implementation for DialUtils.
*
*/


#ifndef DIALUTILSIMPL_H
#define DIALUTILSIMPL_H

//  INCLUDES
#include    <e32std.h>
#include    <dialutils.h> 


// FORWARD DECLARATIONS
class RSharedDataClient;
class CRepository;


// CONSTANTS

// The prefix text.
typedef TBuf<10> TDiUtPrefixText;


// CLASS DECLARATION

/**
*  DialUtils implementation.
*  
*  @lib DialUtils.lib
*  @since 2.6
*/
class CDialUtilsImpl
:   public CDialUtilsApi
    {
    public:  // Constructors and destructor

        /**
        * Two-phased constructor.
        * @return an instance of DialUtilsImpl.
        */
        static CDialUtilsImpl* NewL();
        
        /**
        * Destructor.
        */
        virtual ~CDialUtilsImpl();


    public:  // New functions

        /**
        * Check and modify the phone number.
        * 
        * @see CDialUtilsApi::CheckNumber.
        */
        TInt CheckNumber( HBufC& aPhoneNumber );


   
    private:

        /**
        * C++ default constructor.
        */
        CDialUtilsImpl();

        /**
        * By default Symbian 2nd phase constructor is private.
        */
        void ConstructL();

        /**
        * Combine the given texts if needed.
        * 
        * @param aPhoneNumber The number to be modified.
        * @param aPrefixText The prefixText to be added 
        *                    to aPhoneNumber if needed.
        */
        TInt CombineTexts(
            TPtr aPhoneNumber,
            const TDiUtPrefixText& aPrefixText ) const;


    private:    // Data

        // The shared data client.
        RSharedDataClient*              iSharedDataClient;

        // The central repository.
        CRepository*                    iRepository;
    };

#endif  // DIALUTILSIMPL_H

// End of file