epoc32/include/mw/epos_cposlmitemiterator.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
parent 1 666f914201fb
child 4 837f303aceeb
permissions -rw-r--r--
Final list of Symbian^2 public API header files
williamr@2
     1
/*
williamr@2
     2
* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). 
williamr@2
     3
* All rights reserved.
williamr@2
     4
* This component and the accompanying materials are made available
williamr@2
     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
williamr@2
     6
* which accompanies this distribution, and is available
williamr@2
     7
* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
williamr@2
     8
*
williamr@2
     9
* Initial Contributors:
williamr@2
    10
* Nokia Corporation - initial contribution.
williamr@2
    11
*
williamr@2
    12
* Contributors:
williamr@2
    13
*
williamr@2
    14
* Description:  CPosLmItemIterator class
williamr@2
    15
*
williamr@2
    16
*/
williamr@2
    17
williamr@2
    18
williamr@2
    19
#ifndef CPOSLMITEMITERATOR_H
williamr@2
    20
#define CPOSLMITEMITERATOR_H
williamr@2
    21
williamr@2
    22
#include <e32base.h>
williamr@2
    23
#include "EPos_Landmarks.h"
williamr@2
    24
williamr@2
    25
/**
williamr@2
    26
*  Landmark item iterator.
williamr@2
    27
*
williamr@2
    28
*  This is an abstract base class for objects which iterates a set of database
williamr@2
    29
*  items in a single database.
williamr@2
    30
*
williamr@2
    31
*  A database item is an item which is stored in a landmark database, i.e. a
williamr@2
    32
*  landmark or a landmark category.
williamr@2
    33
*
williamr@2
    34
*  Note that an iterator either iterates categories or landmarks. The items are
williamr@2
    35
*  never mixed.
williamr@2
    36
*
williamr@2
    37
*  This class does not export a constructor. The instance is created by the
williamr@2
    38
*  operation which generates the item set to be iterated. The iterator may
williamr@2
    39
*  implement a caching scheme, but that scheme depends on what is iterated.
williamr@2
    40
*
williamr@2
    41
*  @lib eposlandmarks.lib
williamr@2
    42
*  @since S60 3.0
williamr@2
    43
*/
williamr@2
    44
class CPosLmItemIterator : public CBase
williamr@2
    45
    {
williamr@2
    46
    public:
williamr@2
    47
williamr@2
    48
        /**
williamr@2
    49
        * Destructor.
williamr@2
    50
        */
williamr@2
    51
        IMPORT_C virtual ~CPosLmItemIterator();
williamr@2
    52
williamr@2
    53
    public:
williamr@2
    54
williamr@2
    55
        /**
williamr@2
    56
        * Returns the next database item ID in the iterated set.
williamr@2
    57
        *
williamr@2
    58
        * The first call will return the first database item ID in the set.
williamr@2
    59
        *
williamr@2
    60
        * @return The next database item ID, or @p KPosLmNullItemId if there
williamr@2
    61
        *   are no more database items in the iterated set.
williamr@2
    62
        */
williamr@2
    63
        virtual TPosLmItemId NextL() = 0;
williamr@2
    64
williamr@2
    65
        /**
williamr@2
    66
        * Resets the database item iterator.
williamr@2
    67
        *
williamr@2
    68
        * The next call to @ref NextL will return the first database item ID in
williamr@2
    69
        * the iterated set.
williamr@2
    70
        */
williamr@2
    71
        virtual void Reset() = 0;
williamr@2
    72
williamr@2
    73
        /**
williamr@2
    74
        * Returns the number of database items which are iterated.
williamr@2
    75
        *
williamr@2
    76
        * @return Number of items in the iterated database item set.
williamr@2
    77
        */
williamr@2
    78
        virtual TUint NumOfItemsL() = 0;
williamr@2
    79
williamr@2
    80
        /**
williamr@2
    81
        * Fetches a sequence of database items from the iterated set.
williamr@2
    82
        *
williamr@2
    83
        * The client supplies an ID array which will be filled by this
williamr@2
    84
        * operation. The array will be reset before any items are added.
williamr@2
    85
        *
williamr@2
    86
        * The client specifies which database item sequence to fetch by
williamr@2
    87
        * supplying a start index (0 is the first item) and the number of items
williamr@2
    88
        * to fetch.
williamr@2
    89
        *
williamr@2
    90
        * @param[out] aIdArray On return contains the requested items.
williamr@2
    91
        * @param[in] aStartIndex The index of the first item to fetch.
williamr@2
    92
        * @param[in] aNumOfItems The number of items to fetch
williamr@2
    93
        *
williamr@2
    94
        * @panic "Landmarks Client"-EPosSpecifiedIntervalLiesOutsideIteratedSet 
williamr@2
    95
        *   specified interval lies [partially] outside the iterated set.
williamr@2
    96
        */
williamr@2
    97
        virtual void GetItemIdsL(
williamr@2
    98
            RArray<TPosLmItemId>& aIdArray,
williamr@2
    99
            TInt aStartIndex,
williamr@2
   100
            TInt aNumOfItems
williamr@2
   101
        ) = 0;
williamr@2
   102
williamr@2
   103
    protected:
williamr@2
   104
williamr@2
   105
        // C++ constructor.
williamr@2
   106
        IMPORT_C CPosLmItemIterator();
williamr@2
   107
williamr@2
   108
    private:
williamr@2
   109
williamr@2
   110
        // Prohibit copy constructor
williamr@2
   111
        CPosLmItemIterator( const CPosLmItemIterator& );
williamr@2
   112
        // Prohibit assigment operator
williamr@2
   113
        CPosLmItemIterator& operator= ( const CPosLmItemIterator& );
williamr@2
   114
williamr@2
   115
    };
williamr@2
   116
williamr@2
   117
#endif      // CPOSLMITEMITERATOR_H
williamr@2
   118
williamr@2
   119