phonebookui/Phonebook/View/inc/CPbkFieldAnalyzer.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:
*       Class to be used by listbox model for analyzing if
*       TPbkContactItemField has speed dial or voice tag.
*
*/

#ifndef __CPBKFIELDANALYZER_H__
#define __CPBKFIELDANALYZER_H__

#include <e32base.h>
#include "MPbkFieldAnalyzer.h"

//  FORWARD DECLARATIONS
class CPbkFieldArray;
class TPbkContactItemField;

class CPbkFieldAnalyzer : public CBase,
                          public MPbkFieldAnalyzer
	{
public:
    /**
     * Creates a new instance of this class.
     *
     * @param aEngine       Contact engine needed for MPbkFieldAnalyzer
     *                      functions. This object does NOT take
     *                      ownership of aContact.
     */
    static CPbkFieldAnalyzer* NewL( const CPbkFieldArray& aArray );

    /**
     * Destructor.
     */
    ~CPbkFieldAnalyzer();

public: // From MPbkFieldAnalyzer
    TBool HasSpeedDialL( const TPbkContactItemField& aField ) const;
    TBool HasVoiceTagL( const TPbkContactItemField& aField ) const;
    
private:
	TBool IsFieldOwned( const TPbkContactItemField& aField ) const;

private:
    CPbkFieldAnalyzer( const CPbkFieldArray& aArray );

private: // Data member
    /// Ref: Contact item to display
    const CPbkFieldArray& iFieldArray;
    };

#endif // __CPBKFIELDANALYZER_H__