|
1 /* |
|
2 * Copyright (c) 2005-2006 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 the License "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: CLandmarkCategoryIterable class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __CLANDMARKCATEGORYITERABLE_H__ |
|
20 #define __CLANDMARKCATEGORYITERABLE_H__ |
|
21 |
|
22 //INCLUDES |
|
23 #include <liwvariant.h> |
|
24 |
|
25 //FORWARD DECLARATIONS |
|
26 class CPosLandmarkCategory; |
|
27 class CPosLandmarkDatabase; |
|
28 class CPosLmCategoryManager; |
|
29 class CPosLmItemIterator; |
|
30 |
|
31 /** |
|
32 * CLandmarkCategoryIterable |
|
33 * This class inherits from CLiwIterable and implements the Reset() and |
|
34 * NextL(TLiwVariant& aEntry) functions. This class is used to iterate through |
|
35 * a list of landmark categories. |
|
36 */ |
|
37 // CLASS DECLARATION |
|
38 NONSHARABLE_CLASS(CLandmarkCategoryIterable): public CLiwIterable |
|
39 { |
|
40 public: //New methods |
|
41 |
|
42 /** |
|
43 * NewL. |
|
44 * Two-phased constructor. |
|
45 * Create a CLandmarkCategoryIterable object. |
|
46 * @param aIterator The iterator to be used for iterating landmark categories. This owns the iterator. |
|
47 * @param aDatabaseUri The URI of the database on which the iteration is to be done. |
|
48 * @return A pointer to the created instance of CLandmarkCategoryIterable. |
|
49 */ |
|
50 static CLandmarkCategoryIterable* NewL( CPosLmItemIterator* aIterator, |
|
51 const TDesC& aDatabaseUri ); |
|
52 |
|
53 /** |
|
54 * ~CLandmarkCategoryIterable |
|
55 * Destructor. |
|
56 */ |
|
57 ~CLandmarkCategoryIterable(); |
|
58 |
|
59 protected: //from CLiwIterable |
|
60 |
|
61 // Resets the iterator. |
|
62 void Reset(); |
|
63 |
|
64 // Iterates over the collection entries to fetch the next data element. |
|
65 TBool NextL(TLiwVariant& aEntry); |
|
66 |
|
67 private: //constructor |
|
68 |
|
69 /** |
|
70 * ConstructL |
|
71 * 2nd phase constructor. |
|
72 * Perform the second phase construction of a |
|
73 * CLandmarkCategoryIterable object. |
|
74 * @param aDatabaseUri The URI of the database on which the iteration is to be done. |
|
75 */ |
|
76 void ConstructL( const TDesC& aDatabaseUri ); |
|
77 |
|
78 /** |
|
79 * CLandmarkCategoryIterable. |
|
80 * C++ default constructor. |
|
81 * @param aIterator The iterator to be used for iterating landmark categories. This owns the iterator. |
|
82 */ |
|
83 CLandmarkCategoryIterable( CPosLmItemIterator* aIterator ); |
|
84 |
|
85 private: //data |
|
86 |
|
87 /** |
|
88 * iIterator |
|
89 * The handle to the CPosLmItemIterator landmark iterator. |
|
90 */ |
|
91 CPosLmItemIterator* iIterator; |
|
92 |
|
93 /** |
|
94 * iDatabase |
|
95 * The handle to the CPosLandmarkDatabase. |
|
96 */ |
|
97 CPosLandmarkDatabase* iDatabase; |
|
98 |
|
99 /** |
|
100 * iCategoryManager |
|
101 * The handle to the CPosLmCategoryManager. |
|
102 */ |
|
103 CPosLmCategoryManager* iCategoryManager; |
|
104 |
|
105 /** |
|
106 * iLandmarkCategory |
|
107 * The CPosLandmark instance retrieved by iterator. |
|
108 */ |
|
109 CPosLandmarkCategory* iLandmarkCategory; |
|
110 |
|
111 /** |
|
112 * iCategoryId |
|
113 * The Id of the category stored as string. |
|
114 */ |
|
115 HBufC* iCategoryId; |
|
116 |
|
117 /** |
|
118 * iGlobalCategoryId |
|
119 * The Global Id of the category stored as string. |
|
120 */ |
|
121 HBufC* iGlobalCategoryId; |
|
122 }; |
|
123 |
|
124 #endif // __CLANDMARKCATEGORYITERABLE_H__ |
|
125 |
|
126 // End of File |