williamr@2
|
1 |
/*
|
williamr@2
|
2 |
* Copyright (c) 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@4
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
williamr@2
|
6 |
* which accompanies this distribution, and is available
|
williamr@4
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.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: Class of options used in listing triggers
|
williamr@2
|
15 |
*
|
williamr@2
|
16 |
*/
|
williamr@2
|
17 |
|
williamr@2
|
18 |
|
williamr@2
|
19 |
#ifndef LBTLISTTRIGGEROPTIONS_H
|
williamr@2
|
20 |
#define LBTLISTTRIGGEROPTIONS_H
|
williamr@2
|
21 |
|
williamr@2
|
22 |
#include <lbtcommon.h>
|
williamr@2
|
23 |
#include <lbtgeoareabase.h>
|
williamr@2
|
24 |
|
williamr@2
|
25 |
class CLbtTriggerFilterBase;
|
williamr@2
|
26 |
|
williamr@2
|
27 |
/**
|
williamr@2
|
28 |
* Helper class for options used when listing trigger entries
|
williamr@2
|
29 |
* from Location Triggering Server.
|
williamr@2
|
30 |
*
|
williamr@2
|
31 |
* The following options can be set.
|
williamr@2
|
32 |
*
|
williamr@2
|
33 |
* - <B>Retrieved fields</B>. It specifies what trigger
|
williamr@2
|
34 |
* entry attributes field and trigger dynamic information field
|
williamr@2
|
35 |
* shall be filled in the returned trigger objects.
|
williamr@2
|
36 |
* Default value for trigger entry attribute field is
|
williamr@2
|
37 |
* KLbtTriggerAttributeFieldsAll, which means
|
williamr@2
|
38 |
* all attributes field shall be filled. Whether the Trigger
|
williamr@2
|
39 |
* ID field is specified or not, the trigger ID attribute is always valid
|
williamr@2
|
40 |
* in returned trigger objects. Default value for trigger dynamic
|
williamr@2
|
41 |
* information field is KLbtTriggerDynInfoFieldsAll, which means all
|
williamr@2
|
42 |
* dynamic information fields will be filled.
|
williamr@2
|
43 |
*
|
williamr@2
|
44 |
* - <B>Trigger filter</B>. It specifies the filter used in retrieving
|
williamr@2
|
45 |
* trigger entries. Retrieved triggers shall fulfill the criteria defined
|
williamr@2
|
46 |
* in the filter. By default, the option does not contain a filter
|
williamr@2
|
47 |
* and all triggers will be retrieved. A composite filter can also be
|
williamr@2
|
48 |
* used.
|
williamr@2
|
49 |
*
|
williamr@2
|
50 |
* - <B>Sorting option</B>. It specifies in which order the retrieved
|
williamr@2
|
51 |
* trigger shall be sorted. The default value is ELbtNoSorting.
|
williamr@2
|
52 |
*
|
williamr@2
|
53 |
* @lib lbt.lib
|
williamr@2
|
54 |
*
|
williamr@2
|
55 |
* @since S60 5.1
|
williamr@2
|
56 |
*/
|
williamr@2
|
57 |
class CLbtListTriggerOptions : public CBase
|
williamr@2
|
58 |
{
|
williamr@2
|
59 |
public:
|
williamr@2
|
60 |
/**
|
williamr@2
|
61 |
* Sorting order when retrieving triggers
|
williamr@2
|
62 |
* from Location Triggering Server.
|
williamr@2
|
63 |
*/
|
williamr@2
|
64 |
enum TLbtListTriggerSorting
|
williamr@2
|
65 |
{
|
williamr@2
|
66 |
/**
|
williamr@2
|
67 |
* Result is not sorted.
|
williamr@2
|
68 |
*/
|
williamr@2
|
69 |
ELbtNoSorting = 1,
|
williamr@2
|
70 |
|
williamr@2
|
71 |
/**
|
williamr@2
|
72 |
* Result is in ascending order according to the trigger name.
|
williamr@2
|
73 |
*/
|
williamr@2
|
74 |
ELbtTriggerNameAscending = 2,
|
williamr@2
|
75 |
|
williamr@2
|
76 |
/**
|
williamr@2
|
77 |
* Result is in descending order according to the trigger name.
|
williamr@2
|
78 |
*/
|
williamr@2
|
79 |
ELbtTriggerNameDescending = 3,
|
williamr@2
|
80 |
|
williamr@2
|
81 |
/**
|
williamr@2
|
82 |
* Result is in ascending order according to the distance from
|
williamr@2
|
83 |
* the trigger area to the latest acquired location by Location
|
williamr@2
|
84 |
* Triggering Server.
|
williamr@2
|
85 |
*/
|
williamr@2
|
86 |
ELbtDistanceToLatestLocationAscending = 4
|
williamr@2
|
87 |
};
|
williamr@2
|
88 |
|
williamr@2
|
89 |
|
williamr@2
|
90 |
public:
|
williamr@2
|
91 |
|
williamr@2
|
92 |
/**
|
williamr@2
|
93 |
* Constructs a new instance of trigger listing option object.
|
williamr@2
|
94 |
* In the returned object, retrieved fields is set
|
williamr@2
|
95 |
* to KLbtTriggerAttributeFieldsAll and KLbtTriggerDynInfoFieldsAll,
|
williamr@2
|
96 |
* no trigger filters is set and sorting option is set to
|
williamr@2
|
97 |
* ELbtNoSorting.
|
williamr@2
|
98 |
*
|
williamr@2
|
99 |
* @return Pointer to the new instance of the trigger
|
williamr@2
|
100 |
* retrieving option object.
|
williamr@2
|
101 |
*/
|
williamr@2
|
102 |
IMPORT_C static CLbtListTriggerOptions* NewL();
|
williamr@2
|
103 |
|
williamr@2
|
104 |
/**
|
williamr@2
|
105 |
* Constructs a new instance of trigger listing option object and
|
williamr@2
|
106 |
* pushes it onto cleanup stack.
|
williamr@2
|
107 |
* In the returned object, retrieved fields is set
|
williamr@2
|
108 |
* to KLbtTriggerAttributeFieldsAll and KLbtTriggerDynInfoFieldsAll,
|
williamr@2
|
109 |
* no trigger filters is set and sorting option is set to
|
williamr@2
|
110 |
* ELbtNoSorting.
|
williamr@2
|
111 |
*
|
williamr@2
|
112 |
* @return Pointer to the new instance of the trigger
|
williamr@2
|
113 |
* retrieving option object.
|
williamr@2
|
114 |
*/
|
williamr@2
|
115 |
IMPORT_C static CLbtListTriggerOptions* NewLC();
|
williamr@2
|
116 |
|
williamr@2
|
117 |
/**
|
williamr@2
|
118 |
* Destructor
|
williamr@2
|
119 |
*/
|
williamr@2
|
120 |
IMPORT_C ~CLbtListTriggerOptions();
|
williamr@2
|
121 |
|
williamr@2
|
122 |
/**
|
williamr@2
|
123 |
* Gets the fields that Location Triggering Server will fill when
|
williamr@2
|
124 |
* list triggers
|
williamr@2
|
125 |
*
|
williamr@2
|
126 |
* If the entry fields mask and dynamic information field mask
|
williamr@2
|
127 |
* is not set before, KLbtTriggerAttributeFieldsAll and
|
williamr@2
|
128 |
* KLbtTriggerDynInfoFieldsAll
|
williamr@2
|
129 |
* are returned.
|
williamr@2
|
130 |
*
|
williamr@2
|
131 |
* @param[out] aEntryMask On return contains the field mask defines
|
williamr@2
|
132 |
* which trigger entry fields shall be filled.
|
williamr@2
|
133 |
* @param[out] aDynInfoMask On return contains the field mask defines
|
williamr@2
|
134 |
* which trigger dynamic information field shall be filled.
|
williamr@2
|
135 |
*/
|
williamr@2
|
136 |
IMPORT_C void GetRetrievedFields(
|
williamr@2
|
137 |
TLbtTriggerAttributeFieldsMask &aEntryMask,
|
williamr@2
|
138 |
TLbtTriggerDynamicInfoFieldsMask &aDynInfoMask ) const;
|
williamr@2
|
139 |
|
williamr@2
|
140 |
/**
|
williamr@2
|
141 |
* Sets which fields shall be filled by Location
|
williamr@2
|
142 |
* Triggering Server when listing triggers.
|
williamr@2
|
143 |
*
|
williamr@2
|
144 |
* @param[in] aEntryMask Mask defines which trigger entry fields shall
|
williamr@2
|
145 |
* be filled.
|
williamr@2
|
146 |
* @param[in] aDynInfoMask The mask defines which dynamic information
|
williamr@2
|
147 |
* field shall be filled.
|
williamr@2
|
148 |
*/
|
williamr@2
|
149 |
IMPORT_C void SetRetrievedFields(
|
williamr@2
|
150 |
TLbtTriggerAttributeFieldsMask aEntryMask,
|
williamr@2
|
151 |
TLbtTriggerDynamicInfoFieldsMask aDynInfoMask = KLbtTriggerDynInfoFieldsAll );
|
williamr@2
|
152 |
|
williamr@2
|
153 |
/**
|
williamr@2
|
154 |
* Gets the sorting option when listing triggers. This
|
williamr@2
|
155 |
* function returns ELbtNoSorting if the sorting option has
|
williamr@2
|
156 |
* not been set.
|
williamr@2
|
157 |
*
|
williamr@2
|
158 |
* @return The sorting option when listing triggers.
|
williamr@2
|
159 |
*/
|
williamr@2
|
160 |
IMPORT_C TLbtListTriggerSorting SortingOption() const;
|
williamr@2
|
161 |
|
williamr@2
|
162 |
/**
|
williamr@2
|
163 |
* Sets the sorting option when listing triggers.
|
williamr@2
|
164 |
*
|
williamr@2
|
165 |
* @param[in] aOption The sorting option when retrieving triggers.
|
williamr@2
|
166 |
*/
|
williamr@2
|
167 |
IMPORT_C void SetSortingOption( TLbtListTriggerSorting aOption );
|
williamr@2
|
168 |
|
williamr@2
|
169 |
/**
|
williamr@2
|
170 |
* Sets the filter used for listing triggers.
|
williamr@2
|
171 |
*
|
williamr@2
|
172 |
* @param[in] aFilter Pointer to the filter used for
|
williamr@2
|
173 |
* listing triggers. If the pointer is NULL, previous set
|
williamr@2
|
174 |
* filter is deleted. Ownership of aFilter is transferred to
|
williamr@2
|
175 |
* the client application.
|
williamr@2
|
176 |
*/
|
williamr@2
|
177 |
IMPORT_C void SetFilter(
|
williamr@2
|
178 |
CLbtTriggerFilterBase* aFilter );
|
williamr@2
|
179 |
|
williamr@2
|
180 |
/**
|
williamr@2
|
181 |
* Gets pointer to the filter used for listing triggers.
|
williamr@2
|
182 |
* The function returns NULL if the filter is not previously set.
|
williamr@2
|
183 |
*
|
williamr@2
|
184 |
* @return The filter used for listing triggers. Ownership
|
williamr@2
|
185 |
* of the returned object is not transferred to the client
|
williamr@2
|
186 |
* application.
|
williamr@2
|
187 |
*/
|
williamr@2
|
188 |
IMPORT_C CLbtTriggerFilterBase* Filter();
|
williamr@2
|
189 |
|
williamr@2
|
190 |
/**
|
williamr@2
|
191 |
* Internalizes the trigger condition object's details and attributes
|
williamr@2
|
192 |
* from stream.
|
williamr@2
|
193 |
*
|
williamr@2
|
194 |
* The presence of this function means that the standard templated
|
williamr@2
|
195 |
* operator>>() ( defined in s32strm.h ) is available to internalize objects
|
williamr@2
|
196 |
* of this class.
|
williamr@2
|
197 |
*
|
williamr@2
|
198 |
* @param[in] aStream Stream from which the object should be internalized.
|
williamr@2
|
199 |
*/
|
williamr@2
|
200 |
IMPORT_C void InternalizeL( RReadStream& aStream );
|
williamr@2
|
201 |
|
williamr@2
|
202 |
/**
|
williamr@2
|
203 |
* Externalizes the trigger condition object's details and attributes
|
williamr@2
|
204 |
* to stream.
|
williamr@2
|
205 |
*
|
williamr@2
|
206 |
* The presence of this function means that the standard templated
|
williamr@2
|
207 |
* operator<<() ( defined in s32strm.h ) is available to externalize objects
|
williamr@2
|
208 |
* of this class.
|
williamr@2
|
209 |
*
|
williamr@2
|
210 |
* @param[in] aStream Stream to which the object should be externalized.
|
williamr@2
|
211 |
*/
|
williamr@2
|
212 |
IMPORT_C void ExternalizeL( RWriteStream& aStream ) const;
|
williamr@2
|
213 |
|
williamr@2
|
214 |
private:
|
williamr@2
|
215 |
/**
|
williamr@2
|
216 |
* Default Constructor.
|
williamr@2
|
217 |
*/
|
williamr@2
|
218 |
CLbtListTriggerOptions();
|
williamr@2
|
219 |
|
williamr@2
|
220 |
/**
|
williamr@2
|
221 |
* By default, prohibit copy constructor
|
williamr@2
|
222 |
*/
|
williamr@2
|
223 |
CLbtListTriggerOptions( const CLbtListTriggerOptions& );
|
williamr@2
|
224 |
|
williamr@2
|
225 |
/**
|
williamr@2
|
226 |
* Prohibit assigment operator
|
williamr@2
|
227 |
*/
|
williamr@2
|
228 |
CLbtListTriggerOptions& operator= ( const CLbtListTriggerOptions& );
|
williamr@2
|
229 |
|
williamr@2
|
230 |
/**
|
williamr@2
|
231 |
* Symbian 2nd phase constructor
|
williamr@2
|
232 |
*/
|
williamr@2
|
233 |
void ConstructL();
|
williamr@2
|
234 |
|
williamr@2
|
235 |
private:
|
williamr@2
|
236 |
/**
|
williamr@2
|
237 |
* Trigger entry fields mask
|
williamr@2
|
238 |
*/
|
williamr@2
|
239 |
TLbtTriggerAttributeFieldsMask iTriigerAttributeFieldsMask;
|
williamr@2
|
240 |
|
williamr@2
|
241 |
/**
|
williamr@2
|
242 |
* Trigger dynamic information field mask
|
williamr@2
|
243 |
*/
|
williamr@2
|
244 |
TLbtTriggerDynamicInfoFieldsMask iDynInfoFieldsMask;
|
williamr@2
|
245 |
|
williamr@2
|
246 |
/**
|
williamr@2
|
247 |
* Filter
|
williamr@2
|
248 |
*/
|
williamr@2
|
249 |
CLbtTriggerFilterBase* iFilter;
|
williamr@2
|
250 |
|
williamr@2
|
251 |
/**
|
williamr@2
|
252 |
* Sorting
|
williamr@2
|
253 |
*/
|
williamr@2
|
254 |
TLbtListTriggerSorting iSorting;
|
williamr@2
|
255 |
|
williamr@2
|
256 |
/**
|
williamr@2
|
257 |
* Reserved
|
williamr@2
|
258 |
*/
|
williamr@2
|
259 |
TUint iReserved[8];
|
williamr@2
|
260 |
};
|
williamr@2
|
261 |
|
williamr@2
|
262 |
#endif // LBTLISTTRIGGEROPTIONS_H
|