2 * Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * 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
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: CPosLmItemIterator class
19 #ifndef CPOSLMITEMITERATOR_H
20 #define CPOSLMITEMITERATOR_H
23 #include "EPos_Landmarks.h"
26 * Landmark item iterator.
28 * This is an abstract base class for objects which iterates a set of database
29 * items in a single database.
31 * A database item is an item which is stored in a landmark database, i.e. a
32 * landmark or a landmark category.
34 * Note that an iterator either iterates categories or landmarks. The items are
37 * This class does not export a constructor. The instance is created by the
38 * operation which generates the item set to be iterated. The iterator may
39 * implement a caching scheme, but that scheme depends on what is iterated.
41 * @lib eposlandmarks.lib
44 class CPosLmItemIterator : public CBase
51 IMPORT_C virtual ~CPosLmItemIterator();
56 * Returns the next database item ID in the iterated set.
58 * The first call will return the first database item ID in the set.
60 * @return The next database item ID, or @p KPosLmNullItemId if there
61 * are no more database items in the iterated set.
63 virtual TPosLmItemId NextL() = 0;
66 * Resets the database item iterator.
68 * The next call to @ref NextL will return the first database item ID in
71 virtual void Reset() = 0;
74 * Returns the number of database items which are iterated.
76 * @return Number of items in the iterated database item set.
78 virtual TUint NumOfItemsL() = 0;
81 * Fetches a sequence of database items from the iterated set.
83 * The client supplies an ID array which will be filled by this
84 * operation. The array will be reset before any items are added.
86 * The client specifies which database item sequence to fetch by
87 * supplying a start index (0 is the first item) and the number of items
90 * @param[out] aIdArray On return contains the requested items.
91 * @param[in] aStartIndex The index of the first item to fetch.
92 * @param[in] aNumOfItems The number of items to fetch
94 * @panic "Landmarks Client"-EPosSpecifiedIntervalLiesOutsideIteratedSet
95 * specified interval lies [partially] outside the iterated set.
97 virtual void GetItemIdsL(
98 RArray<TPosLmItemId>& aIdArray,
106 IMPORT_C CPosLmItemIterator();
110 // Prohibit copy constructor
111 CPosLmItemIterator( const CPosLmItemIterator& );
112 // Prohibit assigment operator
113 CPosLmItemIterator& operator= ( const CPosLmItemIterator& );
117 #endif // CPOSLMITEMITERATOR_H