|
1 /* |
|
2 * Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Landmark iterator. |
|
15 * |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef CPOSLMLOCALLANDMARKITERATOR_H |
|
21 #define CPOSLMLOCALLANDMARKITERATOR_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <EPos_TPosLmSortPref.h> |
|
25 #include "EPos_CPosLmLocalIterator.h" |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class CPosLmLocalDatabase; |
|
29 |
|
30 // CLASS DECLARATION |
|
31 |
|
32 /** |
|
33 * Landmark iterator. Iterates through all landmarks in a landmarks database. |
|
34 * |
|
35 * @lib eposlmlocalaccess.lib |
|
36 */ |
|
37 NONSHARABLE_CLASS(CPosLmLocalLandmarkIterator) : public CPosLmLocalIterator |
|
38 { |
|
39 |
|
40 public: // Constructors and destructor |
|
41 |
|
42 /** |
|
43 * Two-phased constructor. |
|
44 * @param aDb A database. |
|
45 * @param aAlreadyHasLock If @p ETrue, the iterator will not try to |
|
46 * acquire a read-lock. |
|
47 */ |
|
48 static CPosLmLocalLandmarkIterator* NewL( |
|
49 /* IN */ CPosLmLocalDatabase& aDb, |
|
50 /* IN */ TBool aAlreadyHasLock = EFalse |
|
51 ); |
|
52 |
|
53 /** |
|
54 * Two-phased constructor. |
|
55 * @param aDb A database. |
|
56 * @param aSortPref A sort preference object. |
|
57 */ |
|
58 static CPosLmLocalLandmarkIterator* NewL( |
|
59 /* IN */ CPosLmLocalDatabase& aDb, |
|
60 /* IN */ TPosLmSortPref aSortPref |
|
61 ); |
|
62 |
|
63 /** |
|
64 * Destructor. |
|
65 */ |
|
66 virtual ~CPosLmLocalLandmarkIterator(); |
|
67 |
|
68 private: |
|
69 |
|
70 /** |
|
71 * C++ default constructor. |
|
72 */ |
|
73 CPosLmLocalLandmarkIterator(); |
|
74 |
|
75 /** |
|
76 * C++ default constructor. |
|
77 * @param aSortPref A sort preference object. |
|
78 */ |
|
79 CPosLmLocalLandmarkIterator( |
|
80 /* IN */ TPosLmSortPref aSortPref |
|
81 ); |
|
82 |
|
83 /** |
|
84 * By default Symbian 2nd phase constructor is private. |
|
85 * @param aDb A database. |
|
86 * @param aAlreadyHasLock If @p ETrue, the iterator will not try to |
|
87 * acquire a read-lock. |
|
88 */ |
|
89 void ConstructL( |
|
90 /* IN */ CPosLmLocalDatabase& aDb, |
|
91 /* IN */ TBool aAlreadyHasLock = EFalse |
|
92 ); |
|
93 |
|
94 private: // Data |
|
95 |
|
96 // Sort preference object. |
|
97 TPosLmSortPref iSortPref; |
|
98 |
|
99 // Is set to ETrue if sort is used. EFalse otherwise. |
|
100 TBool iUseSort; |
|
101 |
|
102 }; |
|
103 |
|
104 #endif // CPOSLMLOCALLANDMARKITERATOR_H |
|
105 |
|
106 // End of File |