author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Tue, 24 Nov 2009 08:56:33 +0200 | |
changeset 33 | 50974a8b132e |
parent 19 | 989d2f495d90 |
permissions | -rw-r--r-- |
19 | 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: CLandmarkFilter class |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
||
19 |
||
20 |
#ifndef __CLANDMARKFILTER_H__ |
|
21 |
#define __CLANDMARKFILTER_H__ |
|
22 |
||
23 |
// INCLUDES |
|
24 |
#include <e32base.h> |
|
33
50974a8b132e
Revision: 200945
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
25 |
#include <EPos_CPosLmCategoryManager.h> |
19 | 26 |
|
27 |
//FORWARD DECLARARTION |
|
28 |
class CPosLmSearchCriteria; |
|
29 |
class TPosLmSortPref; |
|
30 |
||
31 |
/** |
|
32 |
* CLandmarkFilter |
|
33 |
* This class acts as a filter for retrieving a set of landmarks or landmark categories |
|
34 |
* based on different criteria from a database. |
|
35 |
*/ |
|
36 |
// CLASS DECLARATION |
|
37 |
NONSHARABLE_CLASS(CLandmarkFilter) : public CBase |
|
38 |
{ |
|
39 |
public: |
|
40 |
/** |
|
41 |
* TFilterItem |
|
42 |
* Specifies if the filter is for a landmark or a landmark category. |
|
43 |
*/ |
|
44 |
enum TFilterItem |
|
45 |
{ |
|
46 |
ECategory = 0 /**<Item is a landmark category.> */, |
|
47 |
ELandmark /**<Item is a landmark.> */ |
|
48 |
}; |
|
49 |
||
50 |
public: // New methods |
|
51 |
||
52 |
/** |
|
53 |
* NewL. |
|
54 |
* Two-phased constructor. |
|
55 |
* Create a CLandmarkFilter object. |
|
56 |
* @param aItem Sets the filter for a landmark or category. |
|
57 |
* @return A pointer to the created instance of CLandmarkFilter. |
|
58 |
*/ |
|
59 |
IMPORT_C static CLandmarkFilter* NewL( TFilterItem aItem ); |
|
60 |
||
61 |
/** |
|
62 |
* NewL. |
|
63 |
* Two-phased constructor. |
|
64 |
* Create a CLandmarkFilter object. |
|
65 |
* @param aItem Sets the filter for a landmark or category. |
|
66 |
* @return a pointer to the created instance of CLandmarkFilter. |
|
67 |
*/ |
|
68 |
IMPORT_C static CLandmarkFilter* NewLC( TFilterItem aItem ); |
|
69 |
||
70 |
/** |
|
71 |
* ~CLandmarkFilter |
|
72 |
* Destructor. |
|
73 |
*/ |
|
74 |
~CLandmarkFilter(); |
|
75 |
||
76 |
public: // function to set search criteria |
|
77 |
||
78 |
/** |
|
79 |
* SetCriteria. |
|
80 |
* This function sets the criteria for search in the database. |
|
81 |
* @param aCriteria The criteria on which the search should be made. |
|
82 |
*/ |
|
83 |
IMPORT_C void SetCriteria ( CPosLmSearchCriteria* aCriteria ); |
|
84 |
||
85 |
/** |
|
86 |
* SetLmSortPref. |
|
87 |
* This function sets the sorting preference of retrieved landmarks. |
|
88 |
* @param aLmSortPref The sorting order of retrieved landmarks. |
|
89 |
*/ |
|
90 |
inline void SetLmSortPref ( const TPosLmSortPref& aLmSortPref ); |
|
91 |
||
92 |
/** |
|
93 |
* SetCatSortPref. |
|
94 |
* This function sets the sorting preference of retrieved categories. |
|
95 |
* @param aCatSortPref The sorting order of retrieved categories. |
|
96 |
*/ |
|
97 |
inline void SetCatSortPref ( |
|
98 |
const CPosLmCategoryManager::TCategorySortPref& aCatSortPref ); |
|
99 |
||
100 |
/** |
|
101 |
* SetPreviousMatches. |
|
102 |
* This function sets flag for searching through a previously retrieved searched list. |
|
103 |
* @param aSearchOnlyPreviousMatches Flag to enable search on previous matches. |
|
104 |
*/ |
|
105 |
inline void SetPreviousMatches ( const TBool& aSearchOnlyPreviousMatches ); |
|
106 |
||
107 |
/** |
|
108 |
* SetMaximumMatches. |
|
109 |
* This function sets the maximum number of matches. |
|
110 |
* @param aMaximumMatches The maximum matches to be returned. |
|
111 |
*/ |
|
112 |
inline void SetMaximumMatches ( const TInt32& aMaximumMatches ); |
|
113 |
||
114 |
public: // function to get search criteria |
|
115 |
||
116 |
/** |
|
117 |
* Criteria. |
|
118 |
* This function returns the criteria for search in the database. |
|
119 |
* @return The criteria on which the search should be made. |
|
120 |
*/ |
|
121 |
inline CPosLmSearchCriteria& Criteria (); |
|
122 |
||
123 |
/** |
|
124 |
* LmSortPref. |
|
125 |
* This function returns the sorting order of retrieved landmarks. |
|
126 |
* @return The sorting order of retrieved landmarks. |
|
127 |
*/ |
|
128 |
inline TPosLmSortPref LmSortPref (); |
|
129 |
||
130 |
/** |
|
131 |
* CatSortPref. |
|
132 |
* This function returns the sorting order of retrieved categories. |
|
133 |
* @return The sorting order of retrieved categories. |
|
134 |
*/ |
|
135 |
inline CPosLmCategoryManager::TCategorySortPref CatSortPref (); |
|
136 |
||
137 |
/** |
|
138 |
* PreviousMatches. |
|
139 |
* This function returns the flag for search on previous matches. |
|
140 |
* @return Flag for search on previous matches. |
|
141 |
*/ |
|
142 |
inline TBool PreviousMatches (); |
|
143 |
||
144 |
/** |
|
145 |
* MaximumMatches. |
|
146 |
* This function returns the maximum matches set for the search. |
|
147 |
* @return The maximum matches to be returned. |
|
148 |
*/ |
|
149 |
inline TInt32 MaximumMatches (); |
|
150 |
||
151 |
/** |
|
152 |
* IsLandmark. |
|
153 |
* This function checks whether the filter is for a landmark or category. |
|
154 |
* @return The flag for type of item to be searched. |
|
155 |
*/ |
|
156 |
inline TBool IsLandmark (); |
|
157 |
||
158 |
private: // Constructors |
|
159 |
||
160 |
/** |
|
161 |
* ConstructL |
|
162 |
* 2nd phase constructor. |
|
163 |
* Perform the second phase construction of a |
|
164 |
* CLandmarkFilter object. |
|
165 |
* @param aItem Sets the filter for a landmark or category. |
|
166 |
*/ |
|
167 |
void ConstructL ( TFilterItem aItem ); |
|
168 |
||
169 |
/** |
|
170 |
* CLandmarkFilter. |
|
171 |
* C++ default constructor. |
|
172 |
*/ |
|
173 |
CLandmarkFilter (); |
|
174 |
||
175 |
private: // Data |
|
176 |
||
177 |
/** |
|
178 |
* iCriteria |
|
179 |
* The handle to the CPosLmSearchCriteria. |
|
180 |
*/ |
|
181 |
CPosLmSearchCriteria* iCriteria; |
|
182 |
||
183 |
/** |
|
184 |
* iLmSortPref |
|
185 |
* The sort preferance for landmarks. |
|
186 |
*/ |
|
187 |
TPosLmSortPref iLmSortPref; |
|
188 |
||
189 |
/** |
|
190 |
* iCatSortPref |
|
191 |
* The sort preferance for categories. |
|
192 |
*/ |
|
193 |
CPosLmCategoryManager::TCategorySortPref iCatSortPref; |
|
194 |
||
195 |
/** |
|
196 |
* iSearchOnlyPreviousMatches |
|
197 |
* Flag to enable search on previous matches. |
|
198 |
*/ |
|
199 |
TBool iSearchOnlyPreviousMatches; |
|
200 |
||
201 |
/** |
|
202 |
* iMaximumMatches |
|
203 |
* Maximum number of matches. |
|
204 |
*/ |
|
205 |
TInt32 iMaximumMatches; |
|
206 |
||
207 |
/** |
|
208 |
* iIsLandmark |
|
209 |
* Flag to check if filter is for landmark search or category search. |
|
210 |
*/ |
|
211 |
TFilterItem iIsLandmark; |
|
212 |
}; |
|
213 |
||
214 |
#include "clandmarkfilter.inl" |
|
215 |
||
216 |
#endif // __CLANDMARKFILTER_H__ |
|
217 |
||
218 |
// End of File |