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: location triggering server client interface
|
williamr@2
|
15 |
*
|
williamr@2
|
16 |
*/
|
williamr@2
|
17 |
|
williamr@2
|
18 |
|
williamr@2
|
19 |
|
williamr@2
|
20 |
#ifndef LBT_H
|
williamr@2
|
21 |
#define LBT_H
|
williamr@2
|
22 |
|
williamr@2
|
23 |
#include <e32std.h>
|
williamr@2
|
24 |
#include <lbs.h>
|
williamr@2
|
25 |
#include <lbtserver.h>
|
williamr@2
|
26 |
#include <lbttriggerentry.h>
|
williamr@2
|
27 |
#include <lbtcommon.h>
|
williamr@2
|
28 |
#include <lbttriggerchangeevent.h>
|
williamr@2
|
29 |
#include <lbttriggeringsystemsettings.h>
|
williamr@2
|
30 |
#include <lbtlisttriggeroptions.h>
|
williamr@2
|
31 |
|
williamr@2
|
32 |
|
williamr@2
|
33 |
class CLbtTriggerEntry;
|
williamr@2
|
34 |
class CLbtTriggerFilterBase;
|
williamr@2
|
35 |
class CLbtListTriggerOptions;
|
williamr@2
|
36 |
class CLbtTriggerInfo;
|
williamr@2
|
37 |
class CLbtClientRequester;
|
williamr@2
|
38 |
class CLbtSubSessnPtrHolder;
|
williamr@2
|
39 |
struct TLbtTriggerCreationInfo;
|
williamr@2
|
40 |
struct TLbtTriggerUpdationInfo;
|
williamr@2
|
41 |
struct TLbtTriggerStateInfo;
|
williamr@2
|
42 |
|
williamr@2
|
43 |
|
williamr@2
|
44 |
/**
|
williamr@2
|
45 |
* A handle to Location Triggering Server subsession. This class provides
|
williamr@2
|
46 |
* methods to use location triggering service from Location Triggering
|
williamr@2
|
47 |
* Server.
|
williamr@2
|
48 |
*
|
williamr@2
|
49 |
* RLbt is used to create subsession with Location Triggering Server for the
|
williamr@2
|
50 |
* purpose of using the location triggering service. This class provides
|
williamr@2
|
51 |
* mechanisms for creating, listing, modifying and deleting trigger entries in
|
williamr@2
|
52 |
* Location Triggering Server. Besides, there are also methods to get
|
williamr@2
|
53 |
* trigger change and system settings change events, and session trigger
|
williamr@2
|
54 |
* firing event. It also provides method for getting
|
williamr@2
|
55 |
* location triggering related system settings.
|
williamr@2
|
56 |
*
|
williamr@2
|
57 |
* Before using any of these services, a connection to Location Triggering
|
williamr@2
|
58 |
* Server must first be made.
|
williamr@2
|
59 |
*
|
williamr@2
|
60 |
* A client can have multiple sessions connected to the Location Triggering
|
williamr@2
|
61 |
* Server. There can be multiple subsessions opened from one session.
|
williamr@2
|
62 |
* Triggers created from one subsession can be accessed from other
|
williamr@2
|
63 |
* subsessions within the same process. Trigger change event, trigger
|
williamr@2
|
64 |
* firing event and triggering system settings change event are
|
williamr@2
|
65 |
* send to all subsessions that have issued notification
|
williamr@2
|
66 |
* requests to Location Triggering Server.
|
williamr@2
|
67 |
*
|
williamr@2
|
68 |
* Client must not issue a notification request while there is
|
williamr@2
|
69 |
* a same request still outstanding. An attempt to do so will generate a
|
williamr@2
|
70 |
* panic with code ELbtDuplicateRequest in category "LocTriggering". This applies
|
williamr@2
|
71 |
* to the following functions.
|
williamr@2
|
72 |
*
|
williamr@2
|
73 |
* - NotifyTriggerChangeEvent
|
williamr@2
|
74 |
* - NotifyTriggerFired
|
williamr@2
|
75 |
* - NotifyTriggeringSystemSettingChange
|
williamr@2
|
76 |
*
|
williamr@2
|
77 |
* Client may get error code KErrInUse if it tries to read, write or delete a
|
williamr@2
|
78 |
* trigger while the previous write or delete operation is not completed yet.
|
williamr@2
|
79 |
*
|
williamr@2
|
80 |
* @see RLbtServer
|
williamr@2
|
81 |
*
|
williamr@2
|
82 |
* @lib lbt.lib
|
williamr@2
|
83 |
*
|
williamr@2
|
84 |
* @since S60 5.1
|
williamr@2
|
85 |
*/
|
williamr@2
|
86 |
class RLbt : public RSubSessionBase
|
williamr@2
|
87 |
{
|
williamr@2
|
88 |
public:
|
williamr@2
|
89 |
/**
|
williamr@2
|
90 |
* Opens a subsession with Location Triggering Server.
|
williamr@2
|
91 |
*
|
williamr@2
|
92 |
* A subsession must be opened before any other service can be used.
|
williamr@2
|
93 |
*
|
williamr@2
|
94 |
* @panic LocTriggering ELbtServerBadHandle If a session to Location
|
williamr@2
|
95 |
* Triggering Server has not been connected.
|
williamr@2
|
96 |
*
|
williamr@2
|
97 |
* @param[in] aServer Reference to the Location Triggering Server
|
williamr@2
|
98 |
* session.
|
williamr@2
|
99 |
*
|
williamr@2
|
100 |
* @return KErrNone if successful. Otherwise, Symbian standard
|
williamr@2
|
101 |
* error code is returned, such as KErrNoMemory, KErrServerBusy, etc.
|
williamr@2
|
102 |
*/
|
williamr@2
|
103 |
IMPORT_C TInt Open( RLbtServer& aServer );
|
williamr@2
|
104 |
|
williamr@2
|
105 |
/**
|
williamr@2
|
106 |
* Connect and open a subsession with Location Triggering Server.
|
williamr@2
|
107 |
*
|
williamr@2
|
108 |
* Note, this function will connect and create a session to Location
|
williamr@2
|
109 |
* Triggering Server. Client application shall avoid unnecesary
|
williamr@2
|
110 |
* session connection to Location Triggering Server. Whenever
|
williamr@2
|
111 |
* possible, client applicaiton shall reuse same session to
|
williamr@2
|
112 |
* open a subsession.
|
williamr@2
|
113 |
*
|
williamr@2
|
114 |
* @panic LocTriggering ELbtServerBadHandle If a session to Location
|
williamr@2
|
115 |
* Triggering Server has not been connected.
|
williamr@2
|
116 |
*
|
williamr@2
|
117 |
* @return KErrNone if successful. Otherwise, Symbian standard
|
williamr@2
|
118 |
* error code is returned, such as KErrNoMemory, KErrServerBusy, etc.
|
williamr@2
|
119 |
*/
|
williamr@2
|
120 |
IMPORT_C TInt Open();
|
williamr@2
|
121 |
|
williamr@2
|
122 |
/**
|
williamr@2
|
123 |
* Closes the subsession with Location Triggering Server.
|
williamr@2
|
124 |
*
|
williamr@2
|
125 |
* Close() must be called when RLbt subsession is no longer required.
|
williamr@2
|
126 |
*
|
williamr@2
|
127 |
* Before a subsession is closed, the client application must ensure
|
williamr@2
|
128 |
* that all outstanding notification requests have been cancelled. In
|
williamr@2
|
129 |
* particular, the application must issue all the appropriate Cancel
|
williamr@2
|
130 |
* requests and then wait for a confirmation that the notification has
|
williamr@2
|
131 |
* been terminated. A failure to do so results in a panic.
|
williamr@2
|
132 |
*
|
williamr@2
|
133 |
* When the subsession is closed, all the session triggers owned by
|
williamr@2
|
134 |
* the client application are deleted by Location Triggering Server.
|
williamr@2
|
135 |
* Start-up triggers are not affected by this method.
|
williamr@2
|
136 |
*
|
williamr@2
|
137 |
* @panic LocTriggering ELbtRequestsNotCancelled If client application
|
williamr@2
|
138 |
* has requests outstanding with Location Triggering Server.
|
williamr@2
|
139 |
*/
|
williamr@2
|
140 |
IMPORT_C void Close();
|
williamr@2
|
141 |
|
williamr@2
|
142 |
/**
|
williamr@2
|
143 |
* Creates a trigger in Location Triggering Server and returns the
|
williamr@2
|
144 |
* trigger Id.
|
williamr@2
|
145 |
*
|
williamr@2
|
146 |
* Client application may use this method to create a trigger in
|
williamr@2
|
147 |
* Location Triggering Server. When a trigger is created, the process
|
williamr@2
|
148 |
* of the client application becomes the owner process of the trigger.
|
williamr@2
|
149 |
*
|
williamr@2
|
150 |
* Trigger entry shall be a subclass of CLbtTriggerEntry.
|
williamr@2
|
151 |
*
|
williamr@2
|
152 |
* Start-up triggers are stored persistently. They can be deleted
|
williamr@2
|
153 |
* by method RLbt::DeleteTriggerL(). Session triggers remain
|
williamr@2
|
154 |
* until DeleteTriggerL() is called or the client's subsession is
|
williamr@2
|
155 |
* closed.
|
williamr@2
|
156 |
*
|
williamr@2
|
157 |
* While creating a trigger, the following attributes are mandatory
|
williamr@2
|
158 |
* for any type of trigger,
|
williamr@2
|
159 |
* - Name
|
williamr@2
|
160 |
* - Requestors
|
williamr@2
|
161 |
* - Trigger condition
|
williamr@2
|
162 |
*
|
williamr@2
|
163 |
* In case of start-up trigger, the following attribute is
|
williamr@2
|
164 |
* also mandatory
|
williamr@2
|
165 |
* - Process Identity
|
williamr@2
|
166 |
*
|
williamr@2
|
167 |
* Although manager UI is not a mandatory attribute, it's highly
|
williamr@2
|
168 |
* recommended that correct manager UI is specified.
|
williamr@2
|
169 |
*
|
williamr@2
|
170 |
* Currently, the system only supports CLbtTriggerConditionArea
|
williamr@2
|
171 |
* to be used as trigger condition. Following
|
williamr@2
|
172 |
* attributes must be specified,
|
williamr@2
|
173 |
* - Trigger area
|
williamr@2
|
174 |
* - Direction
|
williamr@2
|
175 |
*
|
williamr@2
|
176 |
* Currently, only CLbtGeoCircle can be used as trigger area. The
|
williamr@2
|
177 |
* center of the geographical circle must be specified.
|
williamr@2
|
178 |
*
|
williamr@2
|
179 |
* If the radius of the trigger area is not specified, minimum
|
williamr@2
|
180 |
* size of trigger area will be used in the created trigger entry.
|
williamr@2
|
181 |
*
|
williamr@2
|
182 |
* The trigger ID attribute is ignored while creating a trigger. If the
|
williamr@2
|
183 |
* trigger is successfully created, trigger ID is returned to the
|
williamr@2
|
184 |
* client application. If the trigger is enabled, Location Triggering
|
williamr@2
|
185 |
* Server will supervise the trigger and fires it when trigger
|
williamr@2
|
186 |
* conditions are met.
|
williamr@2
|
187 |
*
|
williamr@2
|
188 |
* Creating any type triggers requires @p Location capability.
|
williamr@2
|
189 |
* @p WriteUserData capability is required in addition to create start-up
|
williamr@2
|
190 |
* triggers.
|
williamr@2
|
191 |
*
|
williamr@2
|
192 |
* @see CLbtTriggerEntry CLbtSessionTrigger CLbtStartupTrigger
|
williamr@2
|
193 |
* @see CancelCreateTrigger
|
williamr@2
|
194 |
*
|
williamr@2
|
195 |
* @panic LocTriggering ELbtServerBadHandle If the subsession is
|
williamr@2
|
196 |
* not opened.
|
williamr@2
|
197 |
*
|
williamr@2
|
198 |
* @param[in] aTrigger The trigger to be created. Trigger Id attribute
|
williamr@2
|
199 |
* is ignored by Location Triggering Server.
|
williamr@2
|
200 |
* @param[out] aTriggerId Contains trigger ID of the created trigger
|
williamr@2
|
201 |
* When the request is completed. Trigger is is unique among all triggers
|
williamr@2
|
202 |
* currently exist in the system. If a trigger is removed from the system,
|
williamr@2
|
203 |
* its Id may be reused by another trigger.
|
williamr@2
|
204 |
* @param[in] aFireOnCreation The parameter specifies if the trigger
|
williamr@2
|
205 |
* can be fired right after the creation.
|
williamr@2
|
206 |
* - If this parameter is ETrue. For entry type of trigger,
|
williamr@2
|
207 |
* if the trigger is created inside the trigger area, it is
|
williamr@2
|
208 |
* fired right after it is created. For exit type of trigger, if the
|
williamr@2
|
209 |
* trigger is created outside of the trigger area, it is
|
williamr@2
|
210 |
* fired right after it is created.
|
williamr@2
|
211 |
* - If this parameter is EFalse. For entry type of
|
williamr@2
|
212 |
* trigger, if the trigger is created inside the trigger area, it
|
williamr@2
|
213 |
* will not be fired immediately. The trigger will be fired when
|
williamr@2
|
214 |
* the terminal moves outside of the trigger area and then enters
|
williamr@2
|
215 |
* the trigger area again. For exit type of trigger, if the trigger
|
williamr@2
|
216 |
* is created outside of trigger area it will be fired immediately.
|
williamr@2
|
217 |
* The trigger will be fired when the terminal moves into the trigger
|
williamr@2
|
218 |
* area and then moves out again.
|
williamr@2
|
219 |
* @param[out] aStatus Contains the error code when the
|
williamr@2
|
220 |
* request is completed.
|
williamr@2
|
221 |
* - KErrNone. If the trigger is created successfully.
|
williamr@2
|
222 |
* - KErrArgument. If any of mandatory attributes are not specified,
|
williamr@2
|
223 |
* the manager UI is specified but it is not a valid UI application,
|
williamr@2
|
224 |
* or the length of the trigger name is zero or larger than
|
williamr@2
|
225 |
* @p KLbtMaxNameLength.
|
williamr@2
|
226 |
* - KErrNotSupported. If the trigger condition is not
|
williamr@2
|
227 |
* an instance of @p CLbtTriggerConditionBasic, or if the trigger area is
|
williamr@2
|
228 |
* not an instance of CLbtGeoCircle. Also returned if the trigger direction
|
williamr@2
|
229 |
* is EFireOnExit and the trigger being created is a cell based trigger.
|
williamr@2
|
230 |
* - KErrAccessDenied. If the requestor attributes are missing, privacy
|
williamr@2
|
231 |
* checking by Location Server determines that any of the specified
|
williamr@2
|
232 |
* requestors do not have permission to retrieve location information,
|
williamr@2
|
233 |
* - KErrPermisionDenied. If the client application does not have
|
williamr@2
|
234 |
* enough capabilities to create this trigger.
|
williamr@2
|
235 |
* - KErrTriggeringAreaTooSmall. If the specified trigger area is
|
williamr@2
|
236 |
* smaller than minimum size of trigger area.
|
williamr@2
|
237 |
* - KErrLbtMaxTriggerLimitExceeded. If creating startup trigger exceeds
|
williamr@2
|
238 |
* the system defined limit.
|
williamr@2
|
239 |
* - KErrDiskFull. Disk full when creating a start-up trigger.
|
williamr@2
|
240 |
* - Other standard Symbian error code, such as KErrNoMemory,
|
williamr@2
|
241 |
* KErrServerBusy, KErrGeneral. If the operation fails.
|
williamr@2
|
242 |
*/
|
williamr@2
|
243 |
IMPORT_C void CreateTrigger(
|
williamr@2
|
244 |
const CLbtTriggerEntry& aTrigger,
|
williamr@2
|
245 |
TLbtTriggerId& aTriggerId,
|
williamr@2
|
246 |
TBool aFireOnCreation,
|
williamr@2
|
247 |
TRequestStatus& aStatus );
|
williamr@2
|
248 |
|
williamr@2
|
249 |
/**
|
williamr@2
|
250 |
* Cancel trigger creation.
|
williamr@2
|
251 |
*
|
williamr@2
|
252 |
* This function does not require any capabilities.
|
williamr@2
|
253 |
*
|
williamr@2
|
254 |
* @see CreateTriggerL
|
williamr@2
|
255 |
*/
|
williamr@2
|
256 |
IMPORT_C void CancelCreateTrigger();
|
williamr@2
|
257 |
|
williamr@2
|
258 |
/**
|
williamr@2
|
259 |
* Deletes a specific trigger from Location Triggering Server.
|
williamr@2
|
260 |
*
|
williamr@2
|
261 |
* Client applications can only delete triggers owned by it.
|
williamr@2
|
262 |
*
|
williamr@2
|
263 |
* Deleting any type triggers requires @p Location capability.
|
williamr@2
|
264 |
* @p WriteUserData capability is required in addition to delete start-up
|
williamr@2
|
265 |
* triggers.
|
williamr@2
|
266 |
*
|
williamr@2
|
267 |
* @panic LocTriggering ELbtServerBadHandle If the subsession is not opened.
|
williamr@2
|
268 |
*
|
williamr@2
|
269 |
* @param[in] aId The ID of the trigger to be deleted.
|
williamr@2
|
270 |
*
|
williamr@2
|
271 |
* @leave KErrNotFound If the specified trigger is not found or
|
williamr@2
|
272 |
* it is not owned by the client application.
|
williamr@2
|
273 |
* @leave KErrInUse If the previous write or delete operation on the
|
williamr@2
|
274 |
* trigger is not completed yet.
|
williamr@2
|
275 |
* @leave Other standard Symbian error code, such as KErrNoMemory,
|
williamr@2
|
276 |
* KErrServerBusy, KErrGeneral, etc.
|
williamr@2
|
277 |
*/
|
williamr@2
|
278 |
IMPORT_C void DeleteTriggerL( TLbtTriggerId aId );
|
williamr@2
|
279 |
|
williamr@2
|
280 |
/**
|
williamr@2
|
281 |
* Delete triggers that are owned by the client application and fulfill
|
williamr@2
|
282 |
* the specified criteria.
|
williamr@2
|
283 |
*
|
williamr@2
|
284 |
* If none of the triggers that belong to the client application
|
williamr@2
|
285 |
* fulfill the specified criteria, the method leaves with KErrNotFound.
|
williamr@2
|
286 |
*
|
williamr@2
|
287 |
* If only a part of the triggers that fullfill the criteria belong to
|
williamr@2
|
288 |
* the client application, then only those triggers belonging to that
|
williamr@2
|
289 |
* client application would be deleted and the method would complete
|
williamr@2
|
290 |
* without any leave.
|
williamr@2
|
291 |
*
|
williamr@2
|
292 |
* If no filter is specified, all triggers owned by the client
|
williamr@2
|
293 |
* application are deleted.
|
williamr@2
|
294 |
*
|
williamr@2
|
295 |
* Deleting any type triggers requires @p Location capability.
|
williamr@2
|
296 |
* @p WriteUserData capability is required in addition to delete
|
williamr@2
|
297 |
* start-up triggers.
|
williamr@2
|
298 |
*
|
williamr@2
|
299 |
* @panic LocTriggering ELbtServerBadHandle If the subsession is not
|
williamr@2
|
300 |
* opened.
|
williamr@2
|
301 |
*
|
williamr@2
|
302 |
* @param[in] aFilter Specify the filter for the delete operation.
|
williamr@2
|
303 |
* Trigger entries that fulfill the criteria will be deleted
|
williamr@2
|
304 |
* from Location Triggering Server. By default, no filter is used.
|
williamr@2
|
305 |
* In this case, all triggers owned by the client applications
|
williamr@2
|
306 |
* will be deleted.
|
williamr@2
|
307 |
* @leave KErrNotSupported If there is an area filter used and the area
|
williamr@2
|
308 |
* is not a type of geographical circular or rectangular area.
|
williamr@2
|
309 |
* @leave KErrNotFound If no trigger belonging to the client application
|
williamr@2
|
310 |
* fullfills the criteria specified.
|
williamr@2
|
311 |
* @leave Other standard Symbian error code, such as KErrNoMemory,
|
williamr@2
|
312 |
* KErrServerBusy, KErrGeneral, etc.
|
williamr@2
|
313 |
*/
|
williamr@2
|
314 |
IMPORT_C void DeleteTriggersL(
|
williamr@2
|
315 |
CLbtTriggerFilterBase* aFilter = NULL );
|
williamr@2
|
316 |
|
williamr@2
|
317 |
/**
|
williamr@2
|
318 |
* Delete triggers asynchronously. Triggers to be deleted must be owned
|
williamr@2
|
319 |
* by the client application and fulfill the specified criteria.
|
williamr@2
|
320 |
*
|
williamr@2
|
321 |
* If no trigger that belong to the client application fulfills the
|
williamr@2
|
322 |
* specified criteria, the method completes the client request
|
williamr@2
|
323 |
* with KErrNotFound.
|
williamr@2
|
324 |
*
|
williamr@2
|
325 |
* If only a part of the triggers that fullfill the criteria belong to
|
williamr@2
|
326 |
* the client application, then only those triggers belonging to that
|
williamr@2
|
327 |
* client application would be deleted and the method would complete
|
williamr@2
|
328 |
* without any error.
|
williamr@2
|
329 |
*
|
williamr@2
|
330 |
* If no filter is specified, all triggers owned by the client
|
williamr@2
|
331 |
* application are deleted.
|
williamr@2
|
332 |
*
|
williamr@2
|
333 |
* Deleting any type triggers requires @p Location capability.
|
williamr@2
|
334 |
* @p WriteUserData capability is required in addition to delete start-up
|
williamr@2
|
335 |
* triggers.
|
williamr@2
|
336 |
*
|
williamr@2
|
337 |
* @panic LocTriggering ELbtServerBadHandle If the subsession is not
|
williamr@2
|
338 |
* opened.
|
williamr@2
|
339 |
*
|
williamr@2
|
340 |
* @param[out] aStatus Contains the error code when the
|
williamr@2
|
341 |
* request is completed.
|
williamr@2
|
342 |
* - KErrNone If the operation was successful.
|
williamr@2
|
343 |
* - KErrNotFound If no trigger belonging to the client application
|
williamr@2
|
344 |
* fullfills the criteria specified.
|
williamr@2
|
345 |
* - Other standard Symbian error code, such as KErrNoMemory,
|
williamr@2
|
346 |
* KErrServerBusy, KErrGeneral, etc.
|
williamr@2
|
347 |
* @param[in] aFilter Specify the filter for the delete operation.
|
williamr@2
|
348 |
* Trigger entries that fulfill the criteria will be deleted
|
williamr@2
|
349 |
* from Location Triggering Server. Default value is NULL in which case
|
williamr@2
|
350 |
* all triggers owned by the client applications will be deleted.
|
williamr@2
|
351 |
*/
|
williamr@2
|
352 |
IMPORT_C void DeleteTriggers(
|
williamr@2
|
353 |
TRequestStatus& aStatus,
|
williamr@2
|
354 |
CLbtTriggerFilterBase* aFilter = NULL );
|
williamr@2
|
355 |
|
williamr@2
|
356 |
/**
|
williamr@2
|
357 |
* Delete triggers based on a list of trigger Ids. The triggers to
|
williamr@2
|
358 |
* be deleted must be owned by the client application.
|
williamr@2
|
359 |
*
|
williamr@2
|
360 |
* If none of the triggers to be deleted are owned by the client
|
williamr@2
|
361 |
* application then no triggers would be deleted and this method
|
williamr@2
|
362 |
* will leave with KErrNotFound.
|
williamr@2
|
363 |
*
|
williamr@2
|
364 |
* If the list is empty, no trigger will be deleted and this method
|
williamr@2
|
365 |
* completes without any leave.
|
williamr@2
|
366 |
*
|
williamr@2
|
367 |
* In the case where a list of trigger IDs are mentioned of which only
|
williamr@2
|
368 |
* a few of those belong to the client, then only all those triggers
|
williamr@2
|
369 |
* that belong to the client will be deleted and the rest ignored. The
|
williamr@2
|
370 |
* method will complete without any leave in this case.
|
williamr@2
|
371 |
*
|
williamr@2
|
372 |
* Deleting any type of triggers requires @p Location capability.
|
williamr@2
|
373 |
* @p WriteUserData capability is required in addition to delete start-up
|
williamr@2
|
374 |
* triggers.
|
williamr@2
|
375 |
*
|
williamr@2
|
376 |
* @panic LocTriggering ELbtServerBadHandle If the subsession is not opened.
|
williamr@2
|
377 |
*
|
williamr@2
|
378 |
* @param[in] aTriggerIdList The list contains IDs of the triggers
|
williamr@2
|
379 |
* that are to be deleted.
|
williamr@2
|
380 |
* @leave Other standard Symbian error code, such as KErrNoMemory,
|
williamr@2
|
381 |
* KErrServerBusy, KErrGeneral, etc.
|
williamr@2
|
382 |
*/
|
williamr@2
|
383 |
IMPORT_C void DeleteTriggersL(
|
williamr@2
|
384 |
const RArray<TLbtTriggerId> &aTriggerIdList );
|
williamr@2
|
385 |
|
williamr@2
|
386 |
/**
|
williamr@2
|
387 |
* Delete triggers asynchronously based on a list of trigger Ids.
|
williamr@2
|
388 |
* The triggers to be deleted must be owned by the client application.
|
williamr@2
|
389 |
*
|
williamr@2
|
390 |
* If none of the triggers to be deleted are owned by the client
|
williamr@2
|
391 |
* application then no triggers would be deleted and this method
|
williamr@2
|
392 |
* will complete the request with KErrNotFound.
|
williamr@2
|
393 |
*
|
williamr@2
|
394 |
* If the list is empty, no trigger will be deleted and this method
|
williamr@2
|
395 |
* completes without any error code.
|
williamr@2
|
396 |
*
|
williamr@2
|
397 |
* In the case where a list of trigger IDs are mentioned of which only
|
williamr@2
|
398 |
* a few of those belong to the client, then only all those triggers
|
williamr@2
|
399 |
* that belong to the client will be deleted and the rest ignored. The
|
williamr@2
|
400 |
* method will complete without any leave in this case.
|
williamr@2
|
401 |
*
|
williamr@2
|
402 |
* Deleting any type of triggers requires @p Location capability.
|
williamr@2
|
403 |
* @p WriteUserData capability is required in addition to delete
|
williamr@2
|
404 |
* start-up triggers.
|
williamr@2
|
405 |
*
|
williamr@2
|
406 |
* @panic LocTriggering ELbtServerBadHandle If the subsession is not
|
williamr@2
|
407 |
* opened.
|
williamr@2
|
408 |
*
|
williamr@2
|
409 |
* @param[in] aTriggerIdList The list contains IDs of the triggers
|
williamr@2
|
410 |
* that are to be deleted.
|
williamr@2
|
411 |
* @param[out] aStatus Contains the error code when the
|
williamr@2
|
412 |
* request is completed.
|
williamr@2
|
413 |
* - KErrNone If the operation was succeed.
|
williamr@2
|
414 |
* - Other standard Symbian error code, such as KErrNoMemory,
|
williamr@2
|
415 |
* KErrServerBusy, KErrGeneral, etc.
|
williamr@2
|
416 |
*/
|
williamr@2
|
417 |
IMPORT_C void DeleteTriggers(
|
williamr@2
|
418 |
const RArray<TLbtTriggerId>& aTriggerIdList,
|
williamr@2
|
419 |
TRequestStatus& aStatus );
|
williamr@2
|
420 |
|
williamr@2
|
421 |
/**
|
williamr@2
|
422 |
* Cancel delete triggers operation.
|
williamr@2
|
423 |
*
|
williamr@2
|
424 |
* This function does not require any capabilities.
|
williamr@2
|
425 |
*
|
williamr@2
|
426 |
* @see DeleteTriggers
|
williamr@2
|
427 |
*/
|
williamr@2
|
428 |
IMPORT_C void CancelDeleteTriggers();
|
williamr@2
|
429 |
|
williamr@2
|
430 |
/**
|
williamr@2
|
431 |
* Gets the specified trigger from Location Triggering Server.
|
williamr@2
|
432 |
*
|
williamr@2
|
433 |
* Client application takes the ownership ofthe returned trigger object.
|
williamr@2
|
434 |
* The returned trigger object is left in cleanup stack when the
|
williamr@2
|
435 |
* trigger entry is successfully retrieved.
|
williamr@2
|
436 |
*
|
williamr@2
|
437 |
* Each trigger entry object consumes about 100 - 200 bytes user heap,
|
williamr@2
|
438 |
* if all attributes are filled. To save memory usage,
|
williamr@2
|
439 |
* client applications can retrieve trigger object with only partial
|
williamr@2
|
440 |
* attributes filled.
|
williamr@2
|
441 |
*
|
williamr@2
|
442 |
* This method requires @p Location capability.
|
williamr@2
|
443 |
*
|
williamr@2
|
444 |
* @panic LocTriggering ELbtServerBadHandle If the subsession is not
|
williamr@2
|
445 |
* opened.
|
williamr@2
|
446 |
* @param[in] aId The ID of the trigger to be retrieved.
|
williamr@2
|
447 |
* @param[in] aEntryFieldMask The trigger entry's attribute field mask.
|
williamr@2
|
448 |
* It specifies what attributes shall be filled in the returned
|
williamr@2
|
449 |
* trigger object. The default value is KLbtTriggerAttributeFieldsAll,
|
williamr@2
|
450 |
* which means all attributes field will be filled. Wether the trigger ID
|
williamr@2
|
451 |
* attribute is specified or not in this mask, the returned
|
williamr@2
|
452 |
* trigger object always contains a valid trigger Id.
|
williamr@2
|
453 |
* @param[in] aDynInfoFieldMask Specifies which dynamic information
|
williamr@2
|
454 |
* field shall be filled in the returned object. The default value is
|
williamr@2
|
455 |
* KLbtTriggerDynInfoFieldsAll, which means all dynamic information
|
williamr@2
|
456 |
* fields will be filled.
|
williamr@2
|
457 |
* @return The retrieved trigger object. Ownership of the object is
|
williamr@2
|
458 |
* transferred to the client application.
|
williamr@2
|
459 |
* @leave KErrNotFound If the specified trigger is not found or it's
|
williamr@2
|
460 |
* not owned by the client application.
|
williamr@2
|
461 |
* @leave Other standard Symbian error code, such as KErrNoMemory,
|
williamr@2
|
462 |
* KErrServerBusy, KErrGeneral, etc.
|
williamr@2
|
463 |
*/
|
williamr@2
|
464 |
IMPORT_C CLbtTriggerInfo* GetTriggerLC(
|
williamr@2
|
465 |
TLbtTriggerId aId,
|
williamr@2
|
466 |
TLbtTriggerAttributeFieldsMask aEntryFieldMask =
|
williamr@2
|
467 |
KLbtTriggerAttributeFieldsAll,
|
williamr@2
|
468 |
TLbtTriggerDynamicInfoFieldsMask aDynInfoFieldMask =
|
williamr@2
|
469 |
KLbtTriggerDynInfoFieldsAll );
|
williamr@2
|
470 |
|
williamr@2
|
471 |
/**
|
williamr@2
|
472 |
* Changes the attributes of the specified trigger.
|
williamr@2
|
473 |
*
|
williamr@2
|
474 |
* Client applications can use this method to change attributes of a
|
williamr@2
|
475 |
* specified trigger that is owned by it. Client applications can
|
williamr@2
|
476 |
* only update triggers owned by itself.
|
williamr@2
|
477 |
*
|
williamr@2
|
478 |
* Some attributes are not modifiable after the trigger is created. Trying
|
williamr@2
|
479 |
* to change the following attributes will generate a leave with
|
williamr@2
|
480 |
* error code KErrAccessDenied.
|
williamr@2
|
481 |
*
|
williamr@2
|
482 |
* For any type of the trigger, the following attributes can't be
|
williamr@2
|
483 |
* modified after the trigger is created.
|
williamr@2
|
484 |
* - ID
|
williamr@2
|
485 |
* - Requestor
|
williamr@2
|
486 |
* - Manager UI
|
williamr@2
|
487 |
*
|
williamr@2
|
488 |
* The following attribute can't be modified in addition for
|
williamr@2
|
489 |
* start-up triggers.
|
williamr@2
|
490 |
* - Trigger handling process identity
|
williamr@2
|
491 |
* - Trigger handling process SID
|
williamr@2
|
492 |
*
|
williamr@2
|
493 |
* If the specified trigger does not belong to the client application
|
williamr@2
|
494 |
* the method leaves with KErrNotFound.
|
williamr@2
|
495 |
*
|
williamr@2
|
496 |
* Updating any type triggers requires @p Location capability.
|
williamr@2
|
497 |
* @p WriteUserData capability is required in addition to update start-up
|
williamr@2
|
498 |
* triggers.
|
williamr@2
|
499 |
*
|
williamr@2
|
500 |
* @panic LocTriggering ELbtServerBadHandle If the subsession is not opened.
|
williamr@2
|
501 |
*
|
williamr@2
|
502 |
* @param[in] aTrigger The trigger object to be updated in Location
|
williamr@2
|
503 |
* Triggering Server. The trigger ID identifies the trigger to be updated.
|
williamr@2
|
504 |
* @param[in] aFieldMask Specifies the attribute fields that are valid in
|
williamr@2
|
505 |
* the aTrigger and shall be updated to the trigger. Trigger ID
|
williamr@2
|
506 |
* field in aTrigger is always used regardless whether the trigger ID
|
williamr@2
|
507 |
* field is marked or not in the mask. The attribute value in aTrigger
|
williamr@2
|
508 |
* is ignored if the attribute field in aFieldMask is not marked.
|
williamr@2
|
509 |
* @param[in] aFireOnUpdate The parameter specifies if the trigger
|
williamr@2
|
510 |
* can be fired right after the update operation.
|
williamr@2
|
511 |
* - If this parameter is ETrue. For entry type of trigger,
|
williamr@2
|
512 |
* if the trigger is updated inside the trigger area, it is
|
williamr@2
|
513 |
* fired right after it is updated. For exit type of trigger, if the
|
williamr@2
|
514 |
* trigger is updated outside of the trigger area, it is
|
williamr@2
|
515 |
* fired right after it is updated.
|
williamr@2
|
516 |
* - If this parameter is EFalse. For entry type of
|
williamr@2
|
517 |
* trigger, if the trigger is updated inside the trigger area, it
|
williamr@2
|
518 |
* will not be fired immediately. The trigger will be fired when
|
williamr@2
|
519 |
* the terminal moves outside of the trigger area and then enters
|
williamr@2
|
520 |
* the trigger area again. For exit type of trigger, if the trigger
|
williamr@2
|
521 |
* is updated outside of trigger area it will be fired immediately.
|
williamr@2
|
522 |
* The trigger will be fired when the terminal moves into the trigger
|
williamr@2
|
523 |
* area and then moves out again.
|
williamr@2
|
524 |
* @leave KErrNotFound If the specified trigger is not found or it's
|
williamr@2
|
525 |
* not owned by the client application.
|
williamr@2
|
526 |
* @leave KErrAccessDenied If the client application tries to change
|
williamr@2
|
527 |
* the attributes which are not modifiable.
|
williamr@2
|
528 |
* @leave KErrArgument If the length of trigger name is zero or
|
williamr@2
|
529 |
* larger than @p KLbtMaxNameLength.
|
williamr@2
|
530 |
* @leave Other standard Symbian error code, such as KErrNoMemory,
|
williamr@2
|
531 |
* KErrServerBusy, KErrGeneral, etc.
|
williamr@2
|
532 |
*/
|
williamr@2
|
533 |
IMPORT_C void UpdateTriggerL(
|
williamr@2
|
534 |
const CLbtTriggerEntry& aTrigger,
|
williamr@2
|
535 |
TLbtTriggerAttributeFieldsMask aFieldMask,
|
williamr@2
|
536 |
TLbtFireOnUpdate aFireOnUpdate );
|
williamr@2
|
537 |
|
williamr@2
|
538 |
|
williamr@2
|
539 |
/**
|
williamr@2
|
540 |
* Changes the attributes of the specified trigger asynchronously
|
williamr@2
|
541 |
*
|
williamr@2
|
542 |
* Client applications can use this method to change attributes of a
|
williamr@2
|
543 |
* specified trigger that is owned by it. Client applications can
|
williamr@2
|
544 |
* only update triggers owned by itself.
|
williamr@2
|
545 |
*
|
williamr@2
|
546 |
* Some attributes are not modifiable after the trigger is created. Trying
|
williamr@2
|
547 |
* to change the following attributes will generate a leave with
|
williamr@2
|
548 |
* error code KErrAccessDenied.
|
williamr@2
|
549 |
*
|
williamr@2
|
550 |
* For any type of the trigger, the following attributes can't be
|
williamr@2
|
551 |
* modified after the trigger is created.
|
williamr@2
|
552 |
* - ID
|
williamr@2
|
553 |
* - Requestor
|
williamr@2
|
554 |
* - Manager UI
|
williamr@2
|
555 |
*
|
williamr@2
|
556 |
* The following attribute can't be modified in addition for
|
williamr@2
|
557 |
* start-up triggers.
|
williamr@2
|
558 |
* - Trigger handling process identity
|
williamr@2
|
559 |
* - Trigger handling process SID
|
williamr@2
|
560 |
*
|
williamr@2
|
561 |
* If the specified trigger does not belong to the client application
|
williamr@2
|
562 |
* the method leaves with KErrNotFound.
|
williamr@2
|
563 |
*
|
williamr@2
|
564 |
* Updating any type triggers requires @p Location capability.
|
williamr@2
|
565 |
* @p WriteUserData capability is required in addition to update start-up
|
williamr@2
|
566 |
* triggers.
|
williamr@2
|
567 |
*
|
williamr@2
|
568 |
* @panic LocTriggering ELbtServerBadHandle If the subsession is not opened.
|
williamr@2
|
569 |
*
|
williamr@2
|
570 |
* @param[in] aTrigger The trigger object to be updated in Location
|
williamr@2
|
571 |
* Triggering Server. The trigger ID identifies the trigger to be updated.
|
williamr@2
|
572 |
* @param[in] aFieldMask Specifies the attribute fields that are valid in
|
williamr@2
|
573 |
* the aTrigger and shall be updated to the trigger. Trigger ID
|
williamr@2
|
574 |
* field in aTrigger is always used regardless whether the trigger ID
|
williamr@2
|
575 |
* field is marked or not in the mask. The attribute value in aTrigger
|
williamr@2
|
576 |
* is ignored if the attribute field in aFieldMask is not marked.
|
williamr@2
|
577 |
* @param[in] aFireOnUpdate The parameter specifies if the trigger
|
williamr@2
|
578 |
* can be fired right after the update operation.
|
williamr@2
|
579 |
* - If this parameter is ETrue. For entry type of trigger,
|
williamr@2
|
580 |
* if the trigger is updated inside the trigger area, it is
|
williamr@2
|
581 |
* fired right after it is updated. For exit type of trigger, if the
|
williamr@2
|
582 |
* trigger is updated outside of the trigger area, it is
|
williamr@2
|
583 |
* fired right after it is updated.
|
williamr@2
|
584 |
* - If this parameter is EFalse. For entry type of
|
williamr@2
|
585 |
* trigger, if the trigger is updated inside the trigger area, it
|
williamr@2
|
586 |
* will not be fired immediately. The trigger will be fired when
|
williamr@2
|
587 |
* the terminal moves outside of the trigger area and then enters
|
williamr@2
|
588 |
* the trigger area again. For exit type of trigger, if the trigger
|
williamr@2
|
589 |
* is updated outside of trigger area it will be fired immediately.
|
williamr@2
|
590 |
* The trigger will be fired when the terminal moves into the trigger
|
williamr@2
|
591 |
* area and then moves out again.
|
williamr@2
|
592 |
* @leave KErrNotFound If the specified trigger is not found or it's
|
williamr@2
|
593 |
* not owned by the client application.
|
williamr@2
|
594 |
* @leave KErrAccessDenied If the client application tries to change
|
williamr@2
|
595 |
* the attributes which are not modifiable.
|
williamr@2
|
596 |
* @leave KErrArgument If the length of trigger name is zero or
|
williamr@2
|
597 |
* larger than @p KLbtMaxNameLength.
|
williamr@2
|
598 |
* @leave Other standard Symbian error code, such as KErrNoMemory,
|
williamr@2
|
599 |
* KErrServerBusy, KErrGeneral, etc.
|
williamr@2
|
600 |
*/
|
williamr@2
|
601 |
IMPORT_C void UpdateTrigger(
|
williamr@2
|
602 |
const CLbtTriggerEntry& aTrigger,
|
williamr@2
|
603 |
TLbtTriggerAttributeFieldsMask aFieldMask,
|
williamr@2
|
604 |
TLbtFireOnUpdate aFireOnUpdate,
|
williamr@2
|
605 |
TRequestStatus& aStatus );
|
williamr@2
|
606 |
|
williamr@2
|
607 |
/**
|
williamr@2
|
608 |
* Cancel update trigger operation.
|
williamr@2
|
609 |
*
|
williamr@2
|
610 |
* This function does not require any capabilities.
|
williamr@2
|
611 |
*
|
williamr@2
|
612 |
* @see UpdateTrigger
|
williamr@2
|
613 |
*/
|
williamr@2
|
614 |
IMPORT_C void CancelUpdateTrigger();
|
williamr@2
|
615 |
|
williamr@2
|
616 |
/**
|
williamr@2
|
617 |
* Sets the state of the specified trigger. Client application can
|
williamr@2
|
618 |
* change the state of only triggers owned by it.
|
williamr@2
|
619 |
*
|
williamr@2
|
620 |
* To enable the trigger, set the trigger state to
|
williamr@2
|
621 |
* @p ELbtTriggerEnabled. To disable the trigger,
|
williamr@2
|
622 |
* set the trigger state to @p ELbtTriggerDisabled.
|
williamr@2
|
623 |
*
|
williamr@2
|
624 |
* Changing state of any type triggers requires @p Location capability.
|
williamr@2
|
625 |
* @p WriteUserData capability is required in addition to change state of
|
williamr@2
|
626 |
* start-up triggers.
|
williamr@2
|
627 |
*
|
williamr@2
|
628 |
* @panic LocTriggering ELbtServerBadHandle If the subsession is not opened.
|
williamr@2
|
629 |
*
|
williamr@2
|
630 |
* @param[in] aId The ID of the trigger whose state will be updated.
|
williamr@2
|
631 |
* @param[in] aState New state of the specified trigger.
|
williamr@2
|
632 |
* @param[in] aFireOnUpdate The parameter specifies if the trigger
|
williamr@2
|
633 |
* can be fired right after the update operation.
|
williamr@2
|
634 |
* - If this parameter is ETrue. For entry type of trigger,
|
williamr@2
|
635 |
* if the trigger is updated inside the trigger area, it is
|
williamr@2
|
636 |
* fired right after it is updated. For exit type of trigger, if the
|
williamr@2
|
637 |
* trigger is updated outside of the trigger area, it is
|
williamr@2
|
638 |
* fired right after it is updated.
|
williamr@2
|
639 |
* - If this parameter is EFalse. For entry type of
|
williamr@2
|
640 |
* trigger, if the trigger is updated inside the trigger area, it
|
williamr@2
|
641 |
* will not be fired immediately. The trigger will be fired when
|
williamr@2
|
642 |
* the terminal moves outside of the trigger area and then enters
|
williamr@2
|
643 |
* the trigger area again. For exit type of trigger, if the trigger
|
williamr@2
|
644 |
* is updated outside of trigger area it will be fired immediately.
|
williamr@2
|
645 |
* The trigger will be fired when the terminal moves into the trigger
|
williamr@2
|
646 |
* area and then moves out again.
|
williamr@2
|
647 |
* @leave KErrNotFound If the specified trigger is not found or it's
|
williamr@2
|
648 |
* not owned by the client application.
|
williamr@2
|
649 |
* @leave Other standard Symbian error code, such as KErrNoMemory,
|
williamr@2
|
650 |
* KErrServerBusy, KErrGeneral, etc.
|
williamr@2
|
651 |
*/
|
williamr@2
|
652 |
IMPORT_C void SetTriggerStateL(
|
williamr@2
|
653 |
TLbtTriggerId aId,
|
williamr@2
|
654 |
CLbtTriggerEntry::TLbtTriggerState aState,
|
williamr@2
|
655 |
TLbtFireOnUpdate aFireOnUpdate );
|
williamr@2
|
656 |
|
williamr@2
|
657 |
/**
|
williamr@2
|
658 |
* Sets state of multiple triggers. Client application can change state
|
williamr@2
|
659 |
* of only triggers owned by it.
|
williamr@2
|
660 |
*
|
williamr@2
|
661 |
* If a filter is specified, all triggers that fulfill the criteria
|
williamr@2
|
662 |
* and owned by the requesting client application will be affected.
|
williamr@2
|
663 |
*
|
williamr@2
|
664 |
* If no filter is specified, all triggers owned by the client
|
williamr@2
|
665 |
* application will be affected.
|
williamr@2
|
666 |
*
|
williamr@2
|
667 |
* If no trigger owned by the client application fulfills the specified
|
williamr@2
|
668 |
* criteria, no trigger will be modified and the method leaves with
|
williamr@2
|
669 |
* KErrNotFound.
|
williamr@2
|
670 |
*
|
williamr@2
|
671 |
* Changing state of any type triggers requires @p Location capability.
|
williamr@2
|
672 |
* @p WriteUserData capability is required in addition to change state of
|
williamr@2
|
673 |
* start-up triggers.
|
williamr@2
|
674 |
*
|
williamr@2
|
675 |
* @panic LocTriggering ELbtServerBadHandle If the subsession is not opened.
|
williamr@2
|
676 |
*
|
williamr@2
|
677 |
* @param[in] aState New state of the triggers.
|
williamr@2
|
678 |
* @param[in] aFireOnUpdate The parameter specifies if the trigger
|
williamr@2
|
679 |
* can be fired right after the update operation.
|
williamr@2
|
680 |
* - If this parameter is ETrue. For entry type of trigger,
|
williamr@2
|
681 |
* if the trigger is updated inside the trigger area, it is
|
williamr@2
|
682 |
* fired right after it is updated. For exit type of trigger, if the
|
williamr@2
|
683 |
* trigger is updated outside of the trigger area, it is
|
williamr@2
|
684 |
* fired right after it is updated.
|
williamr@2
|
685 |
* - If this parameter is EFalse. For entry type of
|
williamr@2
|
686 |
* trigger, if the trigger is updated inside the trigger area, it
|
williamr@2
|
687 |
* will not be fired immediately. The trigger will be fired when
|
williamr@2
|
688 |
* the terminal moves outside of the trigger area and then enters
|
williamr@2
|
689 |
* the trigger area again. For exit type of trigger, if the trigger
|
williamr@2
|
690 |
* is updated outside of trigger area it will be fired immediately.
|
williamr@2
|
691 |
* The trigger will be fired when the terminal moves into the trigger
|
williamr@2
|
692 |
* area and then moves out again.
|
williamr@2
|
693 |
* @param[in] aFilter The filter to be used. Triggers that fulfill
|
williamr@2
|
694 |
* the criteria of the specified filter will be affected.
|
williamr@2
|
695 |
* Default value is NULL in which case all triggers owned by the client
|
williamr@2
|
696 |
* application will be updated.
|
williamr@2
|
697 |
* @leave KErrNotSupported If there is an area filter used and the area
|
williamr@2
|
698 |
* is not a type of geographical circular or rectangular area.
|
williamr@2
|
699 |
* @leave Other standard Symbian error code, such as KErrNoMemory,
|
williamr@2
|
700 |
* KErrServerBusy, KErrGeneral, etc.
|
williamr@2
|
701 |
*/
|
williamr@2
|
702 |
IMPORT_C void SetTriggersStateL(
|
williamr@2
|
703 |
CLbtTriggerEntry::TLbtTriggerState aState,
|
williamr@2
|
704 |
TLbtFireOnUpdate aFireOnUpdate,
|
williamr@2
|
705 |
CLbtTriggerFilterBase* aFilter = NULL );
|
williamr@2
|
706 |
|
williamr@2
|
707 |
/**
|
williamr@2
|
708 |
* Sets state of multiple triggers asynchronously.
|
williamr@2
|
709 |
*
|
williamr@2
|
710 |
* If a filter is specified, all triggers owned by the client
|
williamr@2
|
711 |
* application that fulfill the criteria will be affected.
|
williamr@2
|
712 |
*
|
williamr@2
|
713 |
* If no filter is specified, all triggers owned by the client
|
williamr@2
|
714 |
* application will be affected.
|
williamr@2
|
715 |
*
|
williamr@2
|
716 |
* If no trigger that are owned by the client application fulfills the
|
williamr@2
|
717 |
* specified criteria, no trigger will be modified and this completes
|
williamr@2
|
718 |
* with KErrNotFound.
|
williamr@2
|
719 |
*
|
williamr@2
|
720 |
* Changing state of any type triggers requires @p Location capability.
|
williamr@2
|
721 |
* @p WriteUserData capability is required in addition to change state of
|
williamr@2
|
722 |
* start-up triggers.
|
williamr@2
|
723 |
*
|
williamr@2
|
724 |
* @panic LocTriggering ELbtServerBadHandle If the subsession is not opened.
|
williamr@2
|
725 |
*
|
williamr@2
|
726 |
* @param[out] aStatus Contains the error code when the
|
williamr@2
|
727 |
* request is completed.
|
williamr@2
|
728 |
* - KErrNotSupported If there is an area filter used and the area
|
williamr@2
|
729 |
* is not a type of geographical circular or rectangular area.
|
williamr@2
|
730 |
* - Other standard Symbian error code, such as KErrNoMemory,
|
williamr@2
|
731 |
* KErrServerBusy, KErrGeneral, etc.
|
williamr@2
|
732 |
* @param[in] aState New state of the triggers.
|
williamr@2
|
733 |
* @param[in] aFireOnUpdate The parameter specifies if the trigger
|
williamr@2
|
734 |
* can be fired right after the update operation.
|
williamr@2
|
735 |
* - If this parameter is ETrue. For entry type of trigger,
|
williamr@2
|
736 |
* if the trigger is updated inside the trigger area, it is
|
williamr@2
|
737 |
* fired right after it is updated. For exit type of trigger, if the
|
williamr@2
|
738 |
* trigger is updated outside of the trigger area, it is
|
williamr@2
|
739 |
* fired right after it is updated.
|
williamr@2
|
740 |
* - If this parameter is EFalse. For entry type of
|
williamr@2
|
741 |
* trigger, if the trigger is updated inside the trigger area, it
|
williamr@2
|
742 |
* will not be fired immediately. The trigger will be fired when
|
williamr@2
|
743 |
* the terminal moves outside of the trigger area and then enters
|
williamr@2
|
744 |
* the trigger area again. For exit type of trigger, if the trigger
|
williamr@2
|
745 |
* is updated outside of trigger area it will be fired immediately.
|
williamr@2
|
746 |
* The trigger will be fired when the terminal moves into the trigger
|
williamr@2
|
747 |
* area and then moves out again.
|
williamr@2
|
748 |
* @param[in] aFilter The filter to be used. Triggers that fulfill
|
williamr@2
|
749 |
* the criteria of the specified filter will be affected.
|
williamr@2
|
750 |
* Default is value is NULL in which case all triggers owned by the
|
williamr@2
|
751 |
* client application will be updated.
|
williamr@2
|
752 |
*/
|
williamr@2
|
753 |
IMPORT_C void SetTriggersState(
|
williamr@2
|
754 |
TRequestStatus& aStatus,
|
williamr@2
|
755 |
CLbtTriggerEntry::TLbtTriggerState aState,
|
williamr@2
|
756 |
TLbtFireOnUpdate aFireOnUpdate,
|
williamr@2
|
757 |
CLbtTriggerFilterBase* aFilter = NULL );
|
williamr@2
|
758 |
|
williamr@2
|
759 |
/**
|
williamr@2
|
760 |
* Cancel set trigger state operation.
|
williamr@2
|
761 |
*
|
williamr@2
|
762 |
* This function does not require any capabilities.
|
williamr@2
|
763 |
*
|
williamr@2
|
764 |
* @see SetTriggersState
|
williamr@2
|
765 |
*/
|
williamr@2
|
766 |
IMPORT_C void CancelSetTriggersState();
|
williamr@2
|
767 |
|
williamr@2
|
768 |
/**
|
williamr@2
|
769 |
* Lists IDs of triggers that are owned by the client application.
|
williamr@2
|
770 |
*
|
williamr@2
|
771 |
* Client applications can specify options used in retrieving
|
williamr@2
|
772 |
* trigger IDs.
|
williamr@2
|
773 |
*
|
williamr@2
|
774 |
* This method requires @p Location capability.
|
williamr@2
|
775 |
*
|
williamr@2
|
776 |
* @see CLbtListTriggerOptions
|
williamr@2
|
777 |
*
|
williamr@2
|
778 |
* @panic LocTriggering ELbtServerBadHandle If the subsession is not opened.
|
williamr@2
|
779 |
*
|
williamr@2
|
780 |
* @param[out] aTriggerIdList On return, aTriggerIdList contains IDs of
|
williamr@2
|
781 |
* retrieved triggers. The content of aTriggerIdList will be cleared
|
williamr@2
|
782 |
* even if this function fails.
|
williamr@2
|
783 |
* @param[in] aListOptions Specified the options used for listing
|
williamr@2
|
784 |
* triggers. By default, the value is NULL. In this case, all triggers
|
williamr@2
|
785 |
* owned by the client application will be retrieved.
|
williamr@2
|
786 |
* @leave KErrNotSupported If there is an area filter used and the area
|
williamr@2
|
787 |
* is not a type of geographical circular or rectangular area.
|
williamr@2
|
788 |
* @leave Other standard Symbian error code, such as KErrNoMemory,
|
williamr@2
|
789 |
* KErrServerBusy, KErrGeneral, etc.
|
williamr@2
|
790 |
*/
|
williamr@2
|
791 |
IMPORT_C void ListTriggerIdsL(
|
williamr@2
|
792 |
RArray < TLbtTriggerId >& aTriggerIdList,
|
williamr@2
|
793 |
CLbtListTriggerOptions* aListOptions = NULL );
|
williamr@2
|
794 |
|
williamr@2
|
795 |
/**
|
williamr@2
|
796 |
* Lists asynchronously IDs of triggers that are owned by the
|
williamr@2
|
797 |
* client application.
|
williamr@2
|
798 |
*
|
williamr@2
|
799 |
* Client applications can specify options used in retrieving
|
williamr@2
|
800 |
* trigger IDs.
|
williamr@2
|
801 |
*
|
williamr@2
|
802 |
* This method requires @p Location capability.
|
williamr@2
|
803 |
*
|
williamr@2
|
804 |
* @see CLbtListTriggerOptions
|
williamr@2
|
805 |
*
|
williamr@2
|
806 |
* @panic LocTriggering ELbtServerBadHandle If the subsession is not
|
williamr@2
|
807 |
* opened.
|
williamr@2
|
808 |
*
|
williamr@2
|
809 |
* @param[out] aStatus Contains the error code when the
|
williamr@2
|
810 |
* request is completed. KErrNotSupported is returned if there is an area
|
williamr@2
|
811 |
* filter used and the area is not a type of geographical circular or
|
williamr@2
|
812 |
* rectangular area.
|
williamr@2
|
813 |
* - KErrNotSupported If there is an area filter used and the area
|
williamr@2
|
814 |
* is not a type of geographical circular or rectangular area.
|
williamr@2
|
815 |
* - Other standard Symbian error code, such as KErrNoMemory,
|
williamr@2
|
816 |
* KErrServerBusy, KErrGeneral, etc.
|
williamr@2
|
817 |
* @param[out] aTriggerIdList On return, aTriggerIdList contains IDs of
|
williamr@2
|
818 |
* retrieved triggers. The content of aTriggerIdList will be cleared
|
williamr@2
|
819 |
* even if this function fails.
|
williamr@2
|
820 |
* @param[in] aListOptions Specified the options used for listing
|
williamr@2
|
821 |
* triggers. Default value is NULL in which case all triggers owned by
|
williamr@2
|
822 |
* the client application will be retrieved.
|
williamr@2
|
823 |
*/
|
williamr@2
|
824 |
IMPORT_C void ListTriggerIds(
|
williamr@2
|
825 |
TRequestStatus& aStatus,
|
williamr@2
|
826 |
RArray < TLbtTriggerId >& aTriggerIdList,
|
williamr@2
|
827 |
CLbtListTriggerOptions* aListOptions = NULL );
|
williamr@2
|
828 |
|
williamr@2
|
829 |
/**
|
williamr@2
|
830 |
* Cancel list trigger ids operation.
|
williamr@2
|
831 |
*
|
williamr@2
|
832 |
* This function does not require any capabilities.
|
williamr@2
|
833 |
*
|
williamr@2
|
834 |
* @see ListTriggerIds
|
williamr@2
|
835 |
*/
|
williamr@2
|
836 |
IMPORT_C void CancelListTriggerIds();
|
williamr@2
|
837 |
|
williamr@2
|
838 |
/**
|
williamr@2
|
839 |
* Gets triggers from Location Triggering Server. A client application
|
williamr@2
|
840 |
* can only retrieve triggers owned by it.
|
williamr@2
|
841 |
*
|
williamr@2
|
842 |
* Client applications can specify options used in retrieving triggers.
|
williamr@2
|
843 |
* Ownership of the returned trigger objects is transferred to
|
williamr@2
|
844 |
* the client application.
|
williamr@2
|
845 |
*
|
williamr@2
|
846 |
* Note: This function may require large free heap memory from
|
williamr@2
|
847 |
* the client application depending on the number of triggers to
|
williamr@2
|
848 |
* be retrieved and the attributes to be filled.
|
williamr@2
|
849 |
*
|
williamr@2
|
850 |
* This method requires @p Location capability.
|
williamr@2
|
851 |
*
|
williamr@2
|
852 |
* @see CLbtListTriggerOptions
|
williamr@2
|
853 |
*
|
williamr@2
|
854 |
* @panic LocTriggering ELbtServerBadHandle If the subsession is not
|
williamr@2
|
855 |
* opened.
|
williamr@2
|
856 |
*
|
williamr@2
|
857 |
* @param[out] aTriggerList On return, contains trigger objects retrieved
|
williamr@2
|
858 |
* from Location Triggering Server. The content of aTriggerList is
|
williamr@2
|
859 |
* cleared even if this function fails. The ownership of the returned
|
williamr@2
|
860 |
* pointers is transfered to the client application.
|
williamr@2
|
861 |
* @param[in] aListOptions Specifies the options for listing triggers.
|
williamr@2
|
862 |
* By default, the value is NULL. In this case all triggers
|
williamr@2
|
863 |
* owned by the client application will be retrieved.
|
williamr@2
|
864 |
* @leave KErrNotSupported If there is an area filter used and the area
|
williamr@2
|
865 |
* is not a type of geographical circular or rectangular area.
|
williamr@2
|
866 |
* @leave Other standard Symbian error code, such as KErrNoMemory,
|
williamr@2
|
867 |
* KErrServerBusy, KErrGeneral, etc.
|
williamr@2
|
868 |
*/
|
williamr@2
|
869 |
IMPORT_C void GetTriggersL(
|
williamr@2
|
870 |
RPointerArray < CLbtTriggerInfo >& aTriggerList,
|
williamr@2
|
871 |
CLbtListTriggerOptions* aListOptions = NULL );
|
williamr@2
|
872 |
|
williamr@2
|
873 |
/**
|
williamr@2
|
874 |
* Gets triggers asynchronously from Location Triggering Server. A
|
williamr@2
|
875 |
* client application can only retrieve triggers owned by it.
|
williamr@2
|
876 |
*
|
williamr@2
|
877 |
* Client applications can specify options used in retrieving triggers.
|
williamr@2
|
878 |
* Ownership of the returned trigger objects is transferred to
|
williamr@2
|
879 |
* the client application.
|
williamr@2
|
880 |
*
|
williamr@2
|
881 |
* Note: This function may require large free heap memory from
|
williamr@2
|
882 |
* the client application depending on the number of triggers to
|
williamr@2
|
883 |
* be retrieved and the attributes to be filled.
|
williamr@2
|
884 |
*
|
williamr@2
|
885 |
* This method requires @p Location capability.
|
williamr@2
|
886 |
*
|
williamr@2
|
887 |
* @see CLbtListTriggerOptions
|
williamr@2
|
888 |
*
|
williamr@2
|
889 |
* @panic LocTriggering ELbtServerBadHandle If the subsession is not opened.
|
williamr@2
|
890 |
*
|
williamr@2
|
891 |
* @param[out] aStatus Contains the error code when the
|
williamr@2
|
892 |
* request is completed.
|
williamr@2
|
893 |
* - KErrNotSupported. If there is an area
|
williamr@2
|
894 |
* filter used and the area is not a type of geographical circular or
|
williamr@2
|
895 |
* rectangular area.
|
williamr@2
|
896 |
* - Other standard Symbian error code, such as KErrNoMemory,
|
williamr@2
|
897 |
* KErrServerBusy, KErrGeneral, etc.
|
williamr@2
|
898 |
* @param[out] aTriggerList On return, contains trigger objects retrieved
|
williamr@2
|
899 |
* from Location Triggering Server. The content of aTriggerList is
|
williamr@2
|
900 |
* cleared even if this function fails. The ownership of the returned
|
williamr@2
|
901 |
* pointers is transfered to the client application.
|
williamr@2
|
902 |
* @param[in] aListOptions Specifies the options for listing triggers.
|
williamr@2
|
903 |
* By default, the value is NULL. In this case all triggers
|
williamr@2
|
904 |
* owned by the client application will be retrieved.
|
williamr@2
|
905 |
*/
|
williamr@2
|
906 |
IMPORT_C void GetTriggers(
|
williamr@2
|
907 |
TRequestStatus& aStatus,
|
williamr@2
|
908 |
RPointerArray < CLbtTriggerInfo >& aTriggerList,
|
williamr@2
|
909 |
CLbtListTriggerOptions* aListOptions = NULL );
|
williamr@2
|
910 |
|
williamr@2
|
911 |
/**
|
williamr@2
|
912 |
* Cancel get triggers operation.
|
williamr@2
|
913 |
*
|
williamr@2
|
914 |
* This function does not require any capabilities.
|
williamr@2
|
915 |
*
|
williamr@2
|
916 |
* @see GetTriggers
|
williamr@2
|
917 |
*/
|
williamr@2
|
918 |
IMPORT_C void CancelGetTriggers();
|
williamr@2
|
919 |
|
williamr@2
|
920 |
/**
|
williamr@2
|
921 |
* Creates an iterator in Location Triggering Server to retrieve
|
williamr@2
|
922 |
* trigger objects incrementally.
|
williamr@2
|
923 |
*
|
williamr@2
|
924 |
* An iterator must be created before GetNextTriggerLC() can be called.
|
williamr@2
|
925 |
* The iterator is constructed in the server side and it is subsession
|
williamr@2
|
926 |
* specific. Calling this function again will reset the iterator.
|
williamr@2
|
927 |
* After the iterator is constructed, the client application calls
|
williamr@2
|
928 |
* GetNextTriggerLC() repeatedly to retrieve all interested trigger
|
williamr@2
|
929 |
* objects. Note, client applications can only get triggers owned by
|
williamr@2
|
930 |
* itself.
|
williamr@2
|
931 |
*
|
williamr@2
|
932 |
* If any trigger is changed during iteration, the client application
|
williamr@2
|
933 |
* shall call this method again to reset the iterator and get the
|
williamr@2
|
934 |
* triggers again incrementally.
|
williamr@2
|
935 |
*
|
williamr@2
|
936 |
* This method requires @p Location capability.
|
williamr@2
|
937 |
*
|
williamr@2
|
938 |
* @see CLbtListTriggerOptions
|
williamr@2
|
939 |
*
|
williamr@2
|
940 |
* @panic LocTriggering ELbtServerBadHandle If the subsession is not opened.
|
williamr@2
|
941 |
*
|
williamr@2
|
942 |
* @param[in] aListOptions Specifies the options used for listing
|
williamr@2
|
943 |
* triggers. Default value is NULL, which will retrieve all triggers
|
williamr@2
|
944 |
* owned by the client application.
|
williamr@2
|
945 |
* @leave KErrNotSupported If there is an area filter used and the area
|
williamr@2
|
946 |
* is not a type of geographical circular or rectangular area.
|
williamr@2
|
947 |
* @leave Other standard Symbian error code, such as KErrNoMemory,
|
williamr@2
|
948 |
* KErrServerBusy, KErrGeneral, etc.
|
williamr@2
|
949 |
*/
|
williamr@2
|
950 |
IMPORT_C void CreateGetTriggerIteratorL(
|
williamr@2
|
951 |
CLbtListTriggerOptions* aListOptions = NULL );
|
williamr@2
|
952 |
|
williamr@2
|
953 |
/**
|
williamr@2
|
954 |
* Creates an iterator asynchronously in Location Triggering Server
|
williamr@2
|
955 |
* to retrieve trigger objects incrementally.
|
williamr@2
|
956 |
*
|
williamr@2
|
957 |
* An iterator must be created before GetNextTriggerLC() can be called.
|
williamr@2
|
958 |
* The iterator is constructed in the server side and it is subsession
|
williamr@2
|
959 |
* specific. Calling this function again will reset the iterator.
|
williamr@2
|
960 |
* After the iterator is constructed, the client application calls
|
williamr@2
|
961 |
* GetNextTriggerLC() repeatedly to retrieve all interested trigger
|
williamr@2
|
962 |
* objects. Note, client applications can only get triggers owned by
|
williamr@2
|
963 |
* itself.
|
williamr@2
|
964 |
*
|
williamr@2
|
965 |
* If any trigger is changed during iteration, the client application
|
williamr@2
|
966 |
* shall call this method again to reset the iterator and get the
|
williamr@2
|
967 |
* triggers again incrementally.
|
williamr@2
|
968 |
*
|
williamr@2
|
969 |
* This method requires @p Location capability.
|
williamr@2
|
970 |
*
|
williamr@2
|
971 |
* @see CLbtListTriggerOptions
|
williamr@2
|
972 |
*
|
williamr@2
|
973 |
* @panic LocTriggering ELbtServerBadHandle If the subsession is not opened.
|
williamr@2
|
974 |
*
|
williamr@2
|
975 |
* @param[out] aStatus Contains the error code when the
|
williamr@2
|
976 |
* request is completed. KErrNotSupported is returned if there is an area
|
williamr@2
|
977 |
* filter used and the area is not a type of geographical circular or
|
williamr@2
|
978 |
* rectangular area.
|
williamr@2
|
979 |
* @param[in] aListOptions Specifies the options used for listing
|
williamr@2
|
980 |
* triggers. Default value is NULL, which will retrieve all triggers
|
williamr@2
|
981 |
* owned by the client application.
|
williamr@2
|
982 |
*/
|
williamr@2
|
983 |
IMPORT_C void CreateGetTriggerIterator(
|
williamr@2
|
984 |
TRequestStatus& aStatus,
|
williamr@2
|
985 |
CLbtListTriggerOptions* aListOptions = NULL );
|
williamr@2
|
986 |
|
williamr@2
|
987 |
/**
|
williamr@2
|
988 |
* Cancel create trigger iterator operation.
|
williamr@2
|
989 |
*
|
williamr@2
|
990 |
* This function does not require any capabilities.
|
williamr@2
|
991 |
*
|
williamr@2
|
992 |
* @see CreateGetTriggerIterator
|
williamr@2
|
993 |
*/
|
williamr@2
|
994 |
IMPORT_C void CancelCreateTriggerIterator();
|
williamr@2
|
995 |
|
williamr@2
|
996 |
/**
|
williamr@2
|
997 |
* Gets trigger objects incrementally.
|
williamr@2
|
998 |
*
|
williamr@2
|
999 |
* This method is used together with CreateGetTriggerIteratorL() to
|
williamr@2
|
1000 |
* incrementally retrieve trigger objects owned by the client
|
williamr@2
|
1001 |
* application. If the iterator is not created when this function is
|
williamr@2
|
1002 |
* called, client application gets a panic with code
|
williamr@2
|
1003 |
* @p ELbtIteratorNotCreated.
|
williamr@2
|
1004 |
*
|
williamr@2
|
1005 |
* This method returns NULL when all triggers are retrieved. Client
|
williamr@2
|
1006 |
* application shall call CreateGetTriggerIteratorL() again to
|
williamr@2
|
1007 |
* reset the iterator.
|
williamr@2
|
1008 |
*
|
williamr@2
|
1009 |
* Client application takes ownership of the returned trigger object.
|
williamr@2
|
1010 |
* The returned trigger object is left in cleanup stack when the trigger
|
williamr@2
|
1011 |
* object is successfully retrieved.
|
williamr@2
|
1012 |
*
|
williamr@2
|
1013 |
* This method requires @p Location capability.
|
williamr@2
|
1014 |
*
|
williamr@2
|
1015 |
* @panic LocTriggering ELbtServerBadHandle If the subsession is not opened.
|
williamr@2
|
1016 |
* @panic LocTriggering ELbtIteratorNotCreated If the iterator has not been created.
|
williamr@2
|
1017 |
*
|
williamr@2
|
1018 |
* @return The retrieved trigger object. Ownership of the returned
|
williamr@2
|
1019 |
* object is transferred to the client application.
|
williamr@2
|
1020 |
* Returns NULL if all triggers have been retrieved.
|
williamr@2
|
1021 |
* @leave Other standard Symbian error code, such as KErrNoMemory,
|
williamr@2
|
1022 |
* KErrServerBusy, KErrGeneral, etc.
|
williamr@2
|
1023 |
*/
|
williamr@2
|
1024 |
IMPORT_C CLbtTriggerInfo* GetNextTriggerLC();
|
williamr@2
|
1025 |
|
williamr@2
|
1026 |
/**
|
williamr@2
|
1027 |
* Listens for change events of the triggers owned by the client
|
williamr@2
|
1028 |
* application.
|
williamr@2
|
1029 |
*
|
williamr@2
|
1030 |
* This method is used by the client application to get change events
|
williamr@2
|
1031 |
* when one or many of its triggers are changed.
|
williamr@2
|
1032 |
*
|
williamr@2
|
1033 |
* Triggers can be deleted and modified not only by the owner process and
|
williamr@2
|
1034 |
* trigger handling process, but also by other system application,
|
williamr@2
|
1035 |
* e.g. system management UI application.
|
williamr@2
|
1036 |
*
|
williamr@2
|
1037 |
* This function is asynchronous and it will complete the request status
|
williamr@2
|
1038 |
* when an event occurs. Client applications can get detailed information of
|
williamr@2
|
1039 |
* the change from the retrieved event object. Client application shall
|
williamr@2
|
1040 |
* call this function again to get further change event.
|
williamr@2
|
1041 |
*
|
williamr@2
|
1042 |
* Event listening can be cancelled by calling
|
williamr@2
|
1043 |
* CancelNotifyTriggerChangeEvent().
|
williamr@2
|
1044 |
*
|
williamr@2
|
1045 |
* This method requires @p Location capability.
|
williamr@2
|
1046 |
*
|
williamr@2
|
1047 |
* @panic LocTriggering ELbtServerBadHandle If the subsession is not opened.
|
williamr@2
|
1048 |
* @panic LocTriggering ELbtDuplicateRequest If the subsession has
|
williamr@2
|
1049 |
* already an outstanding NotifyTriggerChangeEvent() request.
|
williamr@2
|
1050 |
*
|
williamr@2
|
1051 |
* @param[out] aEvent Will contain the event information when an event
|
williamr@2
|
1052 |
* occurs.
|
williamr@2
|
1053 |
* @param[out] aStatus Will be completed with @p KErrNone if an event occurs
|
williamr@2
|
1054 |
* and an error code(for example, KErrServerBusy, etc.) if some error
|
williamr@2
|
1055 |
* was encountered.
|
williamr@2
|
1056 |
*/
|
williamr@2
|
1057 |
IMPORT_C void NotifyTriggerChangeEvent(
|
williamr@2
|
1058 |
TLbtTriggerChangeEvent& aEvent,
|
williamr@2
|
1059 |
TRequestStatus& aStatus );
|
williamr@2
|
1060 |
|
williamr@2
|
1061 |
/**
|
williamr@2
|
1062 |
* Cancels listening for trigger change event.
|
williamr@2
|
1063 |
*
|
williamr@2
|
1064 |
* This function does not require any capabilities.
|
williamr@2
|
1065 |
*
|
williamr@2
|
1066 |
* @see NotifyTriggerChangeEvent
|
williamr@2
|
1067 |
*/
|
williamr@2
|
1068 |
IMPORT_C void CancelNotifyTriggerChangeEvent();
|
williamr@2
|
1069 |
|
williamr@2
|
1070 |
/**
|
williamr@2
|
1071 |
* Listens for the event if any trigger is fired.
|
williamr@2
|
1072 |
*
|
williamr@2
|
1073 |
* Client applications can use this method to get notified
|
williamr@2
|
1074 |
* when a trigger (session triggers and start-up triggers) is
|
williamr@2
|
1075 |
* fired. The firing information is
|
williamr@2
|
1076 |
* returned to the client application. If more that one
|
williamr@2
|
1077 |
* trigger is fired, Location Triggers Server will complete
|
williamr@2
|
1078 |
* the request and the first fired trigger is returned.
|
williamr@2
|
1079 |
* Client application shall call this method again to get next
|
williamr@2
|
1080 |
* trigger firing event.
|
williamr@2
|
1081 |
*
|
williamr@2
|
1082 |
* When a start-up trigger is fired, Location Triggering
|
williamr@2
|
1083 |
* Server will first launch the specified trigger
|
williamr@2
|
1084 |
* handling process, and then notify the client application
|
williamr@2
|
1085 |
* about the firing event.
|
williamr@2
|
1086 |
*
|
williamr@2
|
1087 |
* A client application will get firing event of
|
williamr@2
|
1088 |
* - triggers that are created by itself(Client application is
|
williamr@2
|
1089 |
* the owner process of the trigger).
|
williamr@2
|
1090 |
* - triggers that trigger handling process SID is set and
|
williamr@2
|
1091 |
* matches SID of the client application's process(Client
|
williamr@2
|
1092 |
* application is the triggering handling process of the
|
williamr@2
|
1093 |
* trigger, and it can access the trigger).
|
williamr@2
|
1094 |
*
|
williamr@2
|
1095 |
* The request is canceled by CancelNotifyTriggerFired()
|
williamr@2
|
1096 |
*
|
williamr@2
|
1097 |
* This method requires @p Location capability.
|
williamr@2
|
1098 |
*
|
williamr@2
|
1099 |
* @panic LocTriggering ELbtServerBadHandle If the subsession is not opened.
|
williamr@2
|
1100 |
* @panic LocTriggering ELbtDuplicateRequest If the subsession has
|
williamr@2
|
1101 |
* already an outstanding NotifyTriggerFired() request.
|
williamr@2
|
1102 |
*
|
williamr@2
|
1103 |
* @param[out] aFireInfo On return contains the fired
|
williamr@2
|
1104 |
* trigger's firing information.
|
williamr@2
|
1105 |
* @param[out] aStatus Will be completed with @p KErrNone if an event
|
williamr@2
|
1106 |
* occurs, and an error code( for example KErrServerBusy, etc.) if some
|
williamr@2
|
1107 |
* error encountered.
|
williamr@2
|
1108 |
*/
|
williamr@2
|
1109 |
IMPORT_C void NotifyTriggerFired(
|
williamr@2
|
1110 |
TLbtTriggerFireInfo& aFireInfo,
|
williamr@2
|
1111 |
TRequestStatus& aStatus );
|
williamr@2
|
1112 |
|
williamr@2
|
1113 |
/**
|
williamr@2
|
1114 |
* Cancels listening for the trigger fired event.
|
williamr@2
|
1115 |
*
|
williamr@2
|
1116 |
* This function does not require any capabilities.
|
williamr@2
|
1117 |
*
|
williamr@2
|
1118 |
* @see NotifyTriggerFired
|
williamr@2
|
1119 |
*/
|
williamr@2
|
1120 |
IMPORT_C void CancelNotifyTriggerFired();
|
williamr@2
|
1121 |
|
williamr@2
|
1122 |
/**
|
williamr@2
|
1123 |
* Gets fired trigger's information.
|
williamr@2
|
1124 |
*
|
williamr@2
|
1125 |
* This method is used by the client application to get information
|
williamr@2
|
1126 |
* of all the fired triggers( session triggers and start-up triggers).
|
williamr@2
|
1127 |
* If the same trigger is
|
williamr@2
|
1128 |
* fired more than once before the client application retrieves
|
williamr@2
|
1129 |
* the firing information, only the most recent fired
|
williamr@2
|
1130 |
* information is returned. If no trigger has been fired,
|
williamr@2
|
1131 |
* an empty list is returned.
|
williamr@2
|
1132 |
*
|
williamr@2
|
1133 |
* This method requires @p Location capability.
|
williamr@2
|
1134 |
*
|
williamr@2
|
1135 |
* @panic LocTriggering ELbtServerBadHandle If the subsession is not opened.
|
williamr@2
|
1136 |
*
|
williamr@2
|
1137 |
* @param[out] aTriggerInfoList On return contains fired triggers'
|
williamr@2
|
1138 |
* information.
|
williamr@2
|
1139 |
* @leave Other standard Symbian error code, such as KErrNoMemory,
|
williamr@2
|
1140 |
* KErrServerBusy, KErrGeneral, etc.
|
williamr@2
|
1141 |
*/
|
williamr@2
|
1142 |
IMPORT_C void GetFiredTriggersL(
|
williamr@2
|
1143 |
RArray < TLbtTriggerFireInfo >& aTriggerInfoList );
|
williamr@2
|
1144 |
|
williamr@2
|
1145 |
/**
|
williamr@2
|
1146 |
* Listens for the change event of triggering system settings.
|
williamr@2
|
1147 |
*
|
williamr@2
|
1148 |
* This function is asynchronous and it will complete the
|
williamr@2
|
1149 |
* request status when triggering system settings are changed.
|
williamr@2
|
1150 |
* Client applications can get detailed information of triggering
|
williamr@2
|
1151 |
* system setting from method GetTriggeringSystemSettingL().
|
williamr@2
|
1152 |
* Client application shall call this function again to get
|
williamr@2
|
1153 |
* further change event.
|
williamr@2
|
1154 |
*
|
williamr@2
|
1155 |
* Event listening can be cancelled by calling
|
williamr@2
|
1156 |
* CancelNotifyTriggeringSystemSettingChange().
|
williamr@2
|
1157 |
*
|
williamr@2
|
1158 |
* This function requires @p ReadUserData capability.
|
williamr@2
|
1159 |
*
|
williamr@2
|
1160 |
* @panic LocTriggering ELbtServerBadHandle If the subsession is not opened.
|
williamr@2
|
1161 |
* @panic LocTriggering ELbtDuplicateRequest If the subsession has
|
williamr@2
|
1162 |
* already an outstanding NotifyTriggeringSystemSettingChange()
|
williamr@2
|
1163 |
* request.
|
williamr@2
|
1164 |
*
|
williamr@2
|
1165 |
* @param[out] aSettings On return contains the new triggering
|
williamr@2
|
1166 |
* system settings.
|
williamr@2
|
1167 |
* @param[out] aStatus Will be completed with @p KErrNone if an
|
williamr@2
|
1168 |
* event occurs and an error code( for example, KErrServerBusy, etc.) if
|
williamr@2
|
1169 |
* some error was encountered.
|
williamr@2
|
1170 |
* aStatus will be completed with KErrPermissionDenied if the client
|
williamr@2
|
1171 |
* application does not have enough capability.
|
williamr@2
|
1172 |
*/
|
williamr@2
|
1173 |
IMPORT_C void NotifyTriggeringSystemSettingChange(
|
williamr@2
|
1174 |
TLbtTriggeringSystemSettings& aSettings,
|
williamr@2
|
1175 |
TRequestStatus& aStatus );
|
williamr@2
|
1176 |
|
williamr@2
|
1177 |
/**
|
williamr@2
|
1178 |
* Cancels listening for triggering system setting change event.
|
williamr@2
|
1179 |
*
|
williamr@2
|
1180 |
* @see NotifyTriggeringSystemSettingChange
|
williamr@2
|
1181 |
*/
|
williamr@2
|
1182 |
IMPORT_C void CancelNotifyTriggeringSystemSettingChange();
|
williamr@2
|
1183 |
|
williamr@2
|
1184 |
/**
|
williamr@2
|
1185 |
* Gets triggering system setting.
|
williamr@2
|
1186 |
*
|
williamr@2
|
1187 |
* This method is used by the client application to get triggering
|
williamr@2
|
1188 |
* system settings. Client applications can use
|
williamr@2
|
1189 |
* NotifyTriggeringSystemSettingChange()
|
williamr@2
|
1190 |
* get the change event of the triggering system settings.
|
williamr@2
|
1191 |
*
|
williamr@2
|
1192 |
* This function requires @p ReadUserData capability.
|
williamr@2
|
1193 |
*
|
williamr@2
|
1194 |
* @since S60 5.1
|
williamr@2
|
1195 |
*
|
williamr@2
|
1196 |
* @panic LocTriggering ELbtServerBadHandle If the subsession is not opened.
|
williamr@2
|
1197 |
*
|
williamr@2
|
1198 |
* @param[out] aSetting On return contains triggering system
|
williamr@2
|
1199 |
* settings.
|
williamr@2
|
1200 |
* @leave KErrPermissionDenied if the client application does not
|
williamr@2
|
1201 |
* have enough capabilities to retrieve the settings.
|
williamr@2
|
1202 |
*/
|
williamr@2
|
1203 |
IMPORT_C void GetTriggeringSystemSettingsL(
|
williamr@2
|
1204 |
TLbtTriggeringSystemSettings& aSetting );
|
williamr@2
|
1205 |
|
williamr@2
|
1206 |
/**
|
williamr@2
|
1207 |
* Cancels all asynchronous operation that has been issued from
|
williamr@2
|
1208 |
* this subsession.
|
williamr@2
|
1209 |
*/
|
williamr@2
|
1210 |
IMPORT_C void CancelAll();
|
williamr@2
|
1211 |
|
williamr@2
|
1212 |
/**
|
williamr@2
|
1213 |
* Default constructor.
|
williamr@2
|
1214 |
*/
|
williamr@2
|
1215 |
IMPORT_C RLbt();
|
williamr@2
|
1216 |
|
williamr@2
|
1217 |
/**
|
williamr@2
|
1218 |
* Destructor.
|
williamr@2
|
1219 |
*/
|
williamr@2
|
1220 |
IMPORT_C ~RLbt();
|
williamr@4
|
1221 |
|
williamr@4
|
1222 |
/**
|
williamr@4
|
1223 |
* Handles list triggers operation
|
williamr@4
|
1224 |
*/
|
williamr@4
|
1225 |
void HandleListTriggerIdsL();
|
williamr@4
|
1226 |
|
williamr@4
|
1227 |
/**
|
williamr@4
|
1228 |
* Handles get triggers operation
|
williamr@4
|
1229 |
*/
|
williamr@4
|
1230 |
|
williamr@4
|
1231 |
void HandleGetTriggersL();
|
williamr@2
|
1232 |
|
williamr@2
|
1233 |
private:
|
williamr@2
|
1234 |
/**
|
williamr@2
|
1235 |
* Helper method for create trigger operation.
|
williamr@2
|
1236 |
*/
|
williamr@2
|
1237 |
void CreateTriggerL(
|
williamr@2
|
1238 |
const CLbtTriggerEntry& aTrigger,
|
williamr@2
|
1239 |
TLbtTriggerId& aTriggerId,
|
williamr@2
|
1240 |
TBool aFireOnCreation,
|
williamr@2
|
1241 |
TRequestStatus& aStatus );
|
williamr@2
|
1242 |
/**
|
williamr@2
|
1243 |
* Helper method for delete triggers operation.
|
williamr@2
|
1244 |
*/
|
williamr@2
|
1245 |
void DeleteTriggersL(
|
williamr@2
|
1246 |
CLbtTriggerFilterBase* aFilter,
|
williamr@2
|
1247 |
TRequestStatus& aStatus );
|
williamr@2
|
1248 |
/**
|
williamr@2
|
1249 |
* Helper method for delete triggers operation.
|
williamr@2
|
1250 |
*/
|
williamr@2
|
1251 |
void DeleteTriggersL(
|
williamr@2
|
1252 |
const RArray<TLbtTriggerId>& aTriggerIdList,
|
williamr@2
|
1253 |
TRequestStatus& aStatus );
|
williamr@2
|
1254 |
|
williamr@2
|
1255 |
/**
|
williamr@2
|
1256 |
* Helper method for update trigger operation.
|
williamr@2
|
1257 |
*/
|
williamr@2
|
1258 |
void UpdateTriggerL(
|
williamr@2
|
1259 |
const CLbtTriggerEntry& aTrigger,
|
williamr@2
|
1260 |
TLbtTriggerAttributeFieldsMask aFieldMask,
|
williamr@2
|
1261 |
TLbtFireOnUpdate aFireOnUpdate,
|
williamr@2
|
1262 |
TRequestStatus& aStatus );
|
williamr@2
|
1263 |
/**
|
williamr@2
|
1264 |
* Helper method for set triggers state operation.
|
williamr@2
|
1265 |
*/
|
williamr@2
|
1266 |
void SetTriggersStateL(
|
williamr@2
|
1267 |
CLbtTriggerEntry::TLbtTriggerState aState,
|
williamr@2
|
1268 |
CLbtTriggerFilterBase* aFilter,
|
williamr@2
|
1269 |
TLbtFireOnUpdate aFireOnUpdate,
|
williamr@2
|
1270 |
TRequestStatus& aStatus );
|
williamr@2
|
1271 |
/**
|
williamr@2
|
1272 |
* Helper method for list trigger ids operation.
|
williamr@2
|
1273 |
*/
|
williamr@2
|
1274 |
void ListTriggerIdsL(
|
williamr@2
|
1275 |
RArray < TLbtTriggerId >& aTriggerIdList,
|
williamr@2
|
1276 |
CLbtListTriggerOptions* aListOptions,
|
williamr@2
|
1277 |
TRequestStatus& aStatus );
|
williamr@2
|
1278 |
|
williamr@2
|
1279 |
/**
|
williamr@2
|
1280 |
* Helper method for get triggers operation.
|
williamr@2
|
1281 |
*/
|
williamr@2
|
1282 |
void GetTriggersL(
|
williamr@2
|
1283 |
RPointerArray < CLbtTriggerInfo >& aTriggerList,
|
williamr@2
|
1284 |
CLbtListTriggerOptions* aListOptions,
|
williamr@2
|
1285 |
TRequestStatus& aStatus );
|
williamr@2
|
1286 |
|
williamr@2
|
1287 |
/**
|
williamr@2
|
1288 |
* Helper method for create trigger iterator operation.
|
williamr@2
|
1289 |
*/
|
williamr@2
|
1290 |
void CreateGetTriggerIteratorL(
|
williamr@2
|
1291 |
CLbtListTriggerOptions* aListOptions,
|
williamr@2
|
1292 |
TRequestStatus& aStatus );
|
williamr@2
|
1293 |
|
williamr@2
|
1294 |
/**
|
williamr@2
|
1295 |
* Helper method for get triggers operation.
|
williamr@2
|
1296 |
*/
|
williamr@2
|
1297 |
void GetTriggersInServerL(CBufFlat* aBuf,CLbtListTriggerOptions* aListOptions,TInt& aBufLength );
|
williamr@2
|
1298 |
|
williamr@4
|
1299 |
/**
|
williamr@4
|
1300 |
* Validates geo area information based on type e.g. Coordinate, Cell, WLan, Hybrid.
|
williamr@4
|
1301 |
*
|
williamr@4
|
1302 |
* @panic ELbtErrArgument If invalid.
|
williamr@4
|
1303 |
*
|
williamr@4
|
1304 |
* @param[in] aGeoArea the geographical area
|
williamr@4
|
1305 |
* @leave Other standard Symbian error code, such as KErrNoMemory
|
williamr@4
|
1306 |
*/
|
williamr@4
|
1307 |
void ValidateGeoAreaInformationL( CLbtGeoAreaBase* aGeoArea );
|
williamr@4
|
1308 |
|
williamr@2
|
1309 |
/**
|
williamr@2
|
1310 |
* Symbian 2nd phase construction.
|
williamr@2
|
1311 |
*/
|
williamr@2
|
1312 |
void ConstructL();
|
williamr@2
|
1313 |
|
williamr@2
|
1314 |
private:// data
|
williamr@2
|
1315 |
/**
|
williamr@2
|
1316 |
* Subsession pointer holder
|
williamr@2
|
1317 |
* Own.
|
williamr@2
|
1318 |
*/
|
williamr@2
|
1319 |
CLbtSubSessnPtrHolder* iPtrHolder;
|
williamr@2
|
1320 |
|
williamr@2
|
1321 |
/**
|
williamr@2
|
1322 |
* Pointer to client requestor.
|
williamr@2
|
1323 |
* Own.
|
williamr@2
|
1324 |
*/
|
williamr@2
|
1325 |
CLbtClientRequester* iClientRequester;
|
williamr@2
|
1326 |
|
williamr@2
|
1327 |
/**
|
williamr@2
|
1328 |
* Trigger entry state.
|
williamr@2
|
1329 |
*/
|
williamr@2
|
1330 |
CLbtTriggerEntry::TLbtTriggerState iState;
|
williamr@2
|
1331 |
|
williamr@2
|
1332 |
/**
|
williamr@2
|
1333 |
* Pointer to TLbtTriggerCreationInfo object.
|
williamr@2
|
1334 |
* Own.
|
williamr@2
|
1335 |
*/
|
williamr@2
|
1336 |
TLbtTriggerCreationInfo* iTriggerCreationInfo;
|
williamr@2
|
1337 |
|
williamr@2
|
1338 |
|
williamr@2
|
1339 |
/**
|
williamr@2
|
1340 |
* Pointer to TLbtTriggerCreationInfo object.
|
williamr@2
|
1341 |
* Own.
|
williamr@2
|
1342 |
*/
|
williamr@2
|
1343 |
TLbtTriggerUpdationInfo* iTriggerUpdationInfo;
|
williamr@2
|
1344 |
|
williamr@2
|
1345 |
/**
|
williamr@2
|
1346 |
* Pointer to TLbtTriggerStateInfo object.
|
williamr@2
|
1347 |
* Own.
|
williamr@2
|
1348 |
*/
|
williamr@2
|
1349 |
TLbtTriggerStateInfo* iTriggerStateInfo;
|
williamr@2
|
1350 |
|
williamr@2
|
1351 |
/**
|
williamr@2
|
1352 |
* CLbtTriggerInfo pointer array.
|
williamr@2
|
1353 |
*/
|
williamr@2
|
1354 |
RPointerArray<CLbtTriggerInfo> iTriggerList;
|
williamr@2
|
1355 |
|
williamr@2
|
1356 |
/**
|
williamr@2
|
1357 |
* Iterator flag.
|
williamr@2
|
1358 |
*/
|
williamr@2
|
1359 |
TBool iCreateIteratorFlag;
|
williamr@2
|
1360 |
};
|
williamr@2
|
1361 |
|
williamr@2
|
1362 |
|
williamr@2
|
1363 |
#endif // LBT_H
|