epoc32/include/mw/epos_cposlmitemiterator.h
branchSymbian2
changeset 2 2fe1408b6811
parent 1 666f914201fb
child 4 837f303aceeb
     1.1 --- a/epoc32/include/mw/epos_cposlmitemiterator.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/mw/epos_cposlmitemiterator.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,119 @@
     1.4 -epos_cposlmitemiterator.h
     1.5 +/*
     1.6 +* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). 
     1.7 +* All rights reserved.
     1.8 +* This component and the accompanying materials are made available
     1.9 +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
    1.10 +* which accompanies this distribution, and is available
    1.11 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.12 +*
    1.13 +* Initial Contributors:
    1.14 +* Nokia Corporation - initial contribution.
    1.15 +*
    1.16 +* Contributors:
    1.17 +*
    1.18 +* Description:  CPosLmItemIterator class
    1.19 +*
    1.20 +*/
    1.21 +
    1.22 +
    1.23 +#ifndef CPOSLMITEMITERATOR_H
    1.24 +#define CPOSLMITEMITERATOR_H
    1.25 +
    1.26 +#include <e32base.h>
    1.27 +#include "EPos_Landmarks.h"
    1.28 +
    1.29 +/**
    1.30 +*  Landmark item iterator.
    1.31 +*
    1.32 +*  This is an abstract base class for objects which iterates a set of database
    1.33 +*  items in a single database.
    1.34 +*
    1.35 +*  A database item is an item which is stored in a landmark database, i.e. a
    1.36 +*  landmark or a landmark category.
    1.37 +*
    1.38 +*  Note that an iterator either iterates categories or landmarks. The items are
    1.39 +*  never mixed.
    1.40 +*
    1.41 +*  This class does not export a constructor. The instance is created by the
    1.42 +*  operation which generates the item set to be iterated. The iterator may
    1.43 +*  implement a caching scheme, but that scheme depends on what is iterated.
    1.44 +*
    1.45 +*  @lib eposlandmarks.lib
    1.46 +*  @since S60 3.0
    1.47 +*/
    1.48 +class CPosLmItemIterator : public CBase
    1.49 +    {
    1.50 +    public:
    1.51 +
    1.52 +        /**
    1.53 +        * Destructor.
    1.54 +        */
    1.55 +        IMPORT_C virtual ~CPosLmItemIterator();
    1.56 +
    1.57 +    public:
    1.58 +
    1.59 +        /**
    1.60 +        * Returns the next database item ID in the iterated set.
    1.61 +        *
    1.62 +        * The first call will return the first database item ID in the set.
    1.63 +        *
    1.64 +        * @return The next database item ID, or @p KPosLmNullItemId if there
    1.65 +        *   are no more database items in the iterated set.
    1.66 +        */
    1.67 +        virtual TPosLmItemId NextL() = 0;
    1.68 +
    1.69 +        /**
    1.70 +        * Resets the database item iterator.
    1.71 +        *
    1.72 +        * The next call to @ref NextL will return the first database item ID in
    1.73 +        * the iterated set.
    1.74 +        */
    1.75 +        virtual void Reset() = 0;
    1.76 +
    1.77 +        /**
    1.78 +        * Returns the number of database items which are iterated.
    1.79 +        *
    1.80 +        * @return Number of items in the iterated database item set.
    1.81 +        */
    1.82 +        virtual TUint NumOfItemsL() = 0;
    1.83 +
    1.84 +        /**
    1.85 +        * Fetches a sequence of database items from the iterated set.
    1.86 +        *
    1.87 +        * The client supplies an ID array which will be filled by this
    1.88 +        * operation. The array will be reset before any items are added.
    1.89 +        *
    1.90 +        * The client specifies which database item sequence to fetch by
    1.91 +        * supplying a start index (0 is the first item) and the number of items
    1.92 +        * to fetch.
    1.93 +        *
    1.94 +        * @param[out] aIdArray On return contains the requested items.
    1.95 +        * @param[in] aStartIndex The index of the first item to fetch.
    1.96 +        * @param[in] aNumOfItems The number of items to fetch
    1.97 +        *
    1.98 +        * @panic "Landmarks Client"-EPosSpecifiedIntervalLiesOutsideIteratedSet 
    1.99 +        *   specified interval lies [partially] outside the iterated set.
   1.100 +        */
   1.101 +        virtual void GetItemIdsL(
   1.102 +            RArray<TPosLmItemId>& aIdArray,
   1.103 +            TInt aStartIndex,
   1.104 +            TInt aNumOfItems
   1.105 +        ) = 0;
   1.106 +
   1.107 +    protected:
   1.108 +
   1.109 +        // C++ constructor.
   1.110 +        IMPORT_C CPosLmItemIterator();
   1.111 +
   1.112 +    private:
   1.113 +
   1.114 +        // Prohibit copy constructor
   1.115 +        CPosLmItemIterator( const CPosLmItemIterator& );
   1.116 +        // Prohibit assigment operator
   1.117 +        CPosLmItemIterator& operator= ( const CPosLmItemIterator& );
   1.118 +
   1.119 +    };
   1.120 +
   1.121 +#endif      // CPOSLMITEMITERATOR_H
   1.122 +
   1.123 +