1 /* |
|
2 * Copyright (c) 2007 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: Location Application Filters |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef T_LCLOCATIONAPPFILTER_H |
|
19 #define T_LCLOCATIONAPPFILTER_H |
|
20 |
|
21 /** |
|
22 * @file lclocationappfilter.h |
|
23 * |
|
24 * This file provides the filters which can be used to customize the list |
|
25 * of Location based Application which can be retrieved from Location Centre |
|
26 * or which can be displayed in Location Centre. |
|
27 * |
|
28 * @note The components which can register with Location Centre are of |
|
29 * two types |
|
30 * - Applications |
|
31 * - Location based services / contents. |
|
32 * |
|
33 * These Client Applications or Services/Contents which register with Location |
|
34 * Centre will be called Location based Application henceforth. |
|
35 * |
|
36 * @lib lcservice.lib |
|
37 * @since S60 5.0 |
|
38 */ |
|
39 |
|
40 // SYSTEM INCLUDES |
|
41 #include <e32base.h> |
|
42 |
|
43 /** |
|
44 * @class TLcLocationAppFilter |
|
45 * Location Application Filter. |
|
46 * |
|
47 * This class allows the client application to configure the list of Location |
|
48 * based Applications that the client intends to obtain from Location Centre |
|
49 * or the list of Location based Application that the client application wants |
|
50 * Location Centre to show. |
|
51 * The filtering is based on characteristics exhibited by the Location based |
|
52 * Applications. These characteristics can be of two types |
|
53 * - System Characteristics defined by |
|
54 * @ref CLcLocationAppInfo::TLcSystemCharacteristics and |
|
55 * - Application Characteristics defined by |
|
56 * @ref CLcLocationAppInfo::TLcApplicationCharacteristics. |
|
57 * |
|
58 * The default state of the filter class for various property is |
|
59 * - System Characteristics is @ref TLcSystemCharacteristics::ESysCharNone |
|
60 * - System Characteristic filter configuration is @ref EFilterStrict |
|
61 * - Application Characteristic is @ref TLcApplicationCharacteristics::EAppCharNone |
|
62 * - Application Characteristic filter configuration is @ref EFilterStrict |
|
63 * |
|
64 * This class is expected to be is passed as an input argument to the |
|
65 * @p GetLocationApplicationsL, @p GetLocationApplications and |
|
66 * @p LaunchLocationCentreL functions of @ref CLcService class. |
|
67 * |
|
68 * @see CLcService::GetLocationApplicationsL |
|
69 * @see CLcService::GetLocationApplications |
|
70 * @see CLcService::LaunchLocationCentreL |
|
71 * |
|
72 * @lib lcservice.lib |
|
73 * @since S60 v5.0 |
|
74 */ |
|
75 class TLcLocationAppFilter |
|
76 { |
|
77 public: |
|
78 /** |
|
79 * @enum TLcFilterConfig |
|
80 * The mode in which the application filtering should be done. |
|
81 * This enumeration is used by the client application to specify the way |
|
82 * in which filtering of applications should be done. |
|
83 */ |
|
84 enum TLcFilterConfig |
|
85 { |
|
86 /** |
|
87 * Location based Application that exhibit only the characteristics |
|
88 * specified by the client applications must be used. If the |
|
89 * System / Application characteristics stored in this object |
|
90 * contains a bitmask of more than one characteristic, then only |
|
91 * those Location based Application which satisfy all the mentioned |
|
92 * characteristics will be considered for filtering. |
|
93 * These characteristics are specified by the enumerations |
|
94 * @ref CLcLocationAppInfo::TLcSystemCharacteristics and |
|
95 * @ref CLcLocationAppInfo::TLcApplicationCharacteristics |
|
96 */ |
|
97 EFilterStrict = 0, |
|
98 |
|
99 /** |
|
100 * Applications that exhibit only the characteristics specified by |
|
101 * the client application alone or other characteristics in-addition |
|
102 * to the specified ones will be used for processing. If the |
|
103 * System / Application characteristics stored in this object |
|
104 * contains a bitmask of more than one characteristic, then |
|
105 * only those Location based Applications which satisfy all the |
|
106 * mentioned characteristics in addtion to optionally satisfying |
|
107 * other characteristics will be considered for filetering. |
|
108 * These characteristics are specified by the enumerations |
|
109 * @ref CLcLocationAppInfo::TLcSystemCharacteristics and |
|
110 * @ref CLcLocationAppInfo::TLcApplicationCharacteristics |
|
111 */ |
|
112 EFilterInclusive = 1, |
|
113 |
|
114 /** |
|
115 * Location based Application that exhibit characteristics other than |
|
116 * those specified by the client application must be used. If the |
|
117 * System / Application characteristics stored in this object |
|
118 * contains a bitmask of more than one characteristic, then only |
|
119 * Location based Application which do not satisfy any of the |
|
120 * mentioned characteristics will be considered for filtering. |
|
121 * These characteristics are specified by the enumerations |
|
122 * @ref CLcLocationAppInfo::TLcSystemCharacteristics and |
|
123 * @ref CLcLocationAppInfo::TLcApplicationCharacteristics |
|
124 */ |
|
125 EFilterExclusive = 2 |
|
126 }; |
|
127 |
|
128 public: // Exported Member Functions |
|
129 /** |
|
130 * Default Constructor |
|
131 */ |
|
132 IMPORT_C TLcLocationAppFilter(); |
|
133 |
|
134 /** |
|
135 * Accessor function which returns the currently configured System |
|
136 * characteristics which will be used for filtering. All the system |
|
137 * characteristics would be combined to form an integer bit-mask and |
|
138 * this function retrieves the current bit-mask. The individual system |
|
139 * characteristics are defined by |
|
140 * @ref CLcLocationAppInfo::TLcSystemCharacteristics enumeration. |
|
141 * |
|
142 * @note If the current configuration of the system characteristics is |
|
143 * the default value @ref CLcLocationAppInfo::ESysCharNone, |
|
144 * then it should not be treated as a bit-mask but as an independent |
|
145 * value alone. |
|
146 * |
|
147 * @since S60 5.0 |
|
148 * @return Bit-mask holding the currently enabled System characteristics. |
|
149 */ |
|
150 IMPORT_C TUint32 SystemCharacteristics() const; |
|
151 |
|
152 /** |
|
153 * Sets the requested system characteristic to the filter. |
|
154 * |
|
155 * All the system characteristics which the Client application intends |
|
156 * to be used for filtering must be combined to form a bit-mask |
|
157 * and this value is set to the filter. |
|
158 * The individual system characteristics are defined by |
|
159 * @ref CLcLocationAppInfo::TLcSystemCharacteristics enumeration. |
|
160 * |
|
161 * @since S60 5.0 |
|
162 * @param[in] aSystemChar System Characteristic bit-mask value. |
|
163 * @return KErrArgument If the value of the input parameter is |
|
164 * if its not a valid mask. |
|
165 */ |
|
166 IMPORT_C TInt SetSystemCharacteristic( TUint32 aSystemChar ); |
|
167 |
|
168 /** |
|
169 * Retrieves the current value of the System characteristics filter option. |
|
170 * The value of the filter is defined by the @ref TLcFilterConfig |
|
171 * enumeration. |
|
172 * |
|
173 * @since S60 5.0 |
|
174 * @return Current System characteristics filter configuration. |
|
175 */ |
|
176 IMPORT_C TLcFilterConfig SysCharFilterConfiguration() const; |
|
177 |
|
178 /** |
|
179 * Sets the filter configuration option for system characteristics. |
|
180 * Location centre can be configured to treat the System |
|
181 * characteristics value based upon this flag. |
|
182 * |
|
183 * @since S60 5.0 |
|
184 * @param[in] aFilterConfig The mode in which the System characteristics |
|
185 * value must be treated. The values which this |
|
186 * variable can assume is defined by the |
|
187 * @ref TLcFilterConfig enumeration. |
|
188 */ |
|
189 IMPORT_C void SetSysCharFilterConfiguration( |
|
190 TLcFilterConfig aFilterConfig ); |
|
191 |
|
192 |
|
193 /** |
|
194 * Accessor function which returns the currently configured Application |
|
195 * characteristics which will be used for filtering. All the application |
|
196 * characteristics would be combined to form an integer bit-mask and |
|
197 * this function retrieves the current bit-mask. The individual application |
|
198 * characteristics are defined by |
|
199 * @ref CLcLocationAppInfo::TLcApplicationCharacteristics enumeration. |
|
200 * |
|
201 * @note If the current configuration of the application characteristics |
|
202 * is the default value @ref EAppCharNone, then it should not be |
|
203 * treated as a bit-mask but as an independent value alone. |
|
204 * |
|
205 * @since S60 5.0 |
|
206 * @return Bit-mask holding the currently enabled System |
|
207 * characteristics. |
|
208 */ |
|
209 IMPORT_C TUint32 ApplicationCharacteristics() const; |
|
210 |
|
211 /** |
|
212 * Sets the requested Application characteristic to the filter. |
|
213 * |
|
214 * All the Application characteristics which the Client application |
|
215 * intends to be used for filtering must be combined to form a bit-mask |
|
216 * and this value is set to the filter. |
|
217 * The individual system characteristics are defined by |
|
218 * @ref CLcLocationAppInfo::TLcApplicationCharacteristics enumeration. |
|
219 * |
|
220 * @since S60 5.0 |
|
221 * @param[in] aAppChar Application Characteristic bit-mask value. |
|
222 * @return KErrArgument If the value of the input parameter is |
|
223 * if its not a valid mask. |
|
224 */ |
|
225 IMPORT_C TInt SetApplicationCharacteristics( TUint32 aAppChar ); |
|
226 |
|
227 /** |
|
228 * Retrieves the current value of the Application characteristics |
|
229 * filter option. The value of the filter is defined by the |
|
230 * @ref TLcFilterConfig enumeration. |
|
231 * |
|
232 * @return Current Application characteristics filter configuration. |
|
233 */ |
|
234 IMPORT_C TLcFilterConfig AppCharFilterConfiguration() const; |
|
235 |
|
236 /** |
|
237 * Sets the filter configuration option for application characteristics. |
|
238 * Location centre can be configured to treat the Application |
|
239 * characteristics value based upon this flag. |
|
240 * |
|
241 * @since S60 5.0 |
|
242 * @param[in] aFilterConfig The mode in which the Application |
|
243 * characteristics value must be treated. The |
|
244 * values which this variable can assume is |
|
245 * defined by the @ref TLcFilterConfig |
|
246 * enumeration. |
|
247 */ |
|
248 IMPORT_C void SetAppCharFilterConfiguration( |
|
249 TLcFilterConfig aFilterConfig ); |
|
250 |
|
251 private: // Data |
|
252 /** |
|
253 * System characteristics which must be used for Filtering Location |
|
254 * applications. This variable contains a Bitmask of the enumeration |
|
255 * CLcLocationAppInfo::TLcSystemCharacteristics. |
|
256 * If the Client application decides to set the default value or |
|
257 * doesn't explicitly initialize this variable then the value used |
|
258 * would be ESysCharNone. |
|
259 */ |
|
260 TUint32 iSystemChar; |
|
261 |
|
262 /** |
|
263 * Filtering option for System Characteristics. |
|
264 * If the client application decides to use the default value for this |
|
265 * filter then then value used would be EFilterStrict. |
|
266 */ |
|
267 TLcFilterConfig iSysFilterConfig; |
|
268 |
|
269 /** |
|
270 * Application characteristics which must be used for Filtering Location |
|
271 * applications. This variable contains a Bitmask of the enumeration |
|
272 * CLcLocationAppInfo::TLcApplicationCharacteristics. |
|
273 * If the Client application decides to set the default value or |
|
274 * doesn't explicitly initialize this variable then the value used |
|
275 * would be EAppCharNone. |
|
276 */ |
|
277 TUint32 iApplicationChar; |
|
278 |
|
279 /** |
|
280 * Filtering option for Application Characteristics. |
|
281 * If the client application decides to use the default value for this |
|
282 * filter then then value used would be EFilterStrict. |
|
283 */ |
|
284 TLcFilterConfig iAppFilterConfig; |
|
285 |
|
286 /** |
|
287 * Reserved for future use. |
|
288 */ |
|
289 TUint8 iReserved[8]; |
|
290 }; |
|
291 |
|
292 #endif // T_LCLOCATIONAPPFILTER_H |
|