phonebookui/Phonebook2/NamesListExtension/inc/TPbk2ContactIterator.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Wed, 13 Oct 2010 14:15:33 +0300
branchRCL_3
changeset 85 38bb213f60ba
parent 0 e686773b3f54
permissions -rw-r--r--
Revision: 201039 Kit: 201041

/*
* Copyright (c) 2005-2007 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: 
*
*/


#ifndef TPBK2CONTACTITERATOR_H
#define TPBK2CONTACTITERATOR_H

// INCLUDES
#include <e32base.h>
#include <MVPbkContactLink.h>
#include <MPbk2ContactLinkIterator.h>
#include <MVPbkContactLinkArray.h>

// FORWARD DECLARATIONS

// CLASS DECLARATION


/**
 * Counts the number of SIM contacts.
 */
class TPbk2ContactIterator : public MPbk2ContactLinkIterator
    {
    public: // New methods
    
        /**
         * Sets the link array that is to be iterated.
         * @param aArray The array that is to be iterated.
         */
        void SetLinkArray( MVPbkContactLinkArray& aArray );

    public: // From MPbk2ContactLinkIterator

        TBool HasNext() const;

        TBool HasPrevious() const;

        MVPbkContactLink* NextL();

        MVPbkContactLink* PreviousL();

        void SetToFirst();

        void SetToLast();

    private: // Data
        MVPbkContactLinkArray* iLinkArray; // not owned
        TInt iIndexOfNext;
    };

#endif // TPBK2CONTACTITERATOR_H

// End of File