epoc32/include/mw/lbt.h
branchSymbian2
changeset 2 2fe1408b6811
child 4 837f303aceeb
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/mw/lbt.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -0,0 +1,1342 @@
     1.4 +/*
     1.5 +* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +* All rights reserved.
     1.7 +* This component and the accompanying materials are made available
     1.8 +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     1.9 +* which accompanies this distribution, and is available
    1.10 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.11 +*
    1.12 +* Initial Contributors:
    1.13 +* Nokia Corporation - initial contribution.
    1.14 +*
    1.15 +* Contributors:
    1.16 +*
    1.17 +* Description:  location triggering server client interface
    1.18 +*
    1.19 +*/
    1.20 +
    1.21 +
    1.22 +
    1.23 +#ifndef LBT_H
    1.24 +#define LBT_H
    1.25 +
    1.26 +#include <e32std.h>
    1.27 +#include <lbs.h>
    1.28 +#include <lbtserver.h>
    1.29 +#include <lbttriggerentry.h>
    1.30 +#include <lbtcommon.h>
    1.31 +#include <lbttriggerchangeevent.h>
    1.32 +#include <lbttriggeringsystemsettings.h>
    1.33 +#include <lbtlisttriggeroptions.h>
    1.34 +
    1.35 +
    1.36 +class CLbtTriggerEntry;
    1.37 +class CLbtTriggerFilterBase;
    1.38 +class CLbtListTriggerOptions;
    1.39 +class CLbtTriggerInfo;
    1.40 +class CLbtClientRequester;
    1.41 +class CLbtSubSessnPtrHolder;
    1.42 +struct TLbtTriggerCreationInfo;
    1.43 +struct TLbtTriggerUpdationInfo;
    1.44 +struct TLbtTriggerStateInfo;
    1.45 +
    1.46 +
    1.47 +/**
    1.48 + * A handle to Location Triggering Server subsession. This class provides 
    1.49 + * methods to use location triggering service from Location Triggering 
    1.50 + * Server.
    1.51 + * 
    1.52 + * RLbt is used to create subsession with Location Triggering Server for the 
    1.53 + * purpose of using the location triggering service. This class provides 
    1.54 + * mechanisms for creating, listing, modifying and deleting trigger entries in 
    1.55 + * Location Triggering Server. Besides, there are also methods to get 
    1.56 + * trigger change and system settings change events, and session trigger 
    1.57 + * firing event. It also provides method for getting
    1.58 + * location triggering related system settings. 
    1.59 + * 
    1.60 + * Before using any of these services, a connection to Location Triggering
    1.61 + * Server must first be made.
    1.62 + *
    1.63 + * A client can have multiple sessions connected to the Location Triggering 
    1.64 + * Server. There can be multiple subsessions opened from one session. 
    1.65 + * Triggers created from one subsession can be accessed from other 
    1.66 + * subsessions within the same process. Trigger change event, trigger
    1.67 + * firing event and triggering system settings change event are 
    1.68 + * send to all subsessions that have issued notification
    1.69 + * requests to Location Triggering Server.
    1.70 + *
    1.71 + * Client must not issue a notification request while there is 
    1.72 + * a same request still outstanding. An attempt to do so will generate a
    1.73 + * panic with code ELbtDuplicateRequest in category "LocTriggering". This applies 
    1.74 + * to the following functions.
    1.75 + * 
    1.76 + * - NotifyTriggerChangeEvent
    1.77 + * - NotifyTriggerFired
    1.78 + * - NotifyTriggeringSystemSettingChange
    1.79 + *
    1.80 + * Client may get error code KErrInUse if it tries to read, write or delete a 
    1.81 + * trigger while the previous write or delete operation is not completed yet. 
    1.82 + *
    1.83 + * @see RLbtServer
    1.84 + * 
    1.85 + * @lib lbt.lib
    1.86 + *
    1.87 + * @since S60 5.1
    1.88 + */
    1.89 +class RLbt : public RSubSessionBase
    1.90 +    {
    1.91 +    public:
    1.92 +       /**
    1.93 +        * Opens a subsession with Location Triggering Server.
    1.94 +        *
    1.95 +        * A subsession must be opened before any other service can be used.
    1.96 +        * 
    1.97 +        * @panic LocTriggering ELbtServerBadHandle If a session to Location 
    1.98 +        * Triggering Server has not been connected.
    1.99 +        *
   1.100 +        * @param[in] aServer Reference to the Location Triggering Server 
   1.101 +        * session.
   1.102 +        *
   1.103 +        * @return KErrNone if successful. Otherwise, Symbian standard 
   1.104 +        * error code is returned, such as KErrNoMemory, KErrServerBusy, etc.
   1.105 +        */
   1.106 +        IMPORT_C TInt Open( RLbtServer& aServer );
   1.107 +
   1.108 +       /**
   1.109 +        * Connect and open a subsession with Location Triggering Server.
   1.110 +        *
   1.111 +        * Note, this function will connect and create a session to Location
   1.112 +        * Triggering Server. Client application shall avoid unnecesary
   1.113 +        * session connection to Location Triggering Server. Whenever
   1.114 +        * possible, client applicaiton shall reuse same session to
   1.115 +        * open a subsession. 
   1.116 +        *
   1.117 +        * @panic LocTriggering ELbtServerBadHandle If a session to Location 
   1.118 +        * Triggering Server has not been connected.
   1.119 +        *
   1.120 +        * @return KErrNone if successful. Otherwise, Symbian standard 
   1.121 +        * error code is returned, such as KErrNoMemory, KErrServerBusy, etc.
   1.122 +        */
   1.123 +        IMPORT_C TInt Open();
   1.124 +    
   1.125 +       /**
   1.126 +        * Closes the subsession with Location Triggering Server.
   1.127 +        *
   1.128 +        * Close() must be called when RLbt subsession is no longer required. 
   1.129 +        * 
   1.130 +        * Before a subsession is closed, the client application must ensure
   1.131 +        * that all outstanding notification requests have been cancelled. In
   1.132 +        * particular, the application must issue all the appropriate Cancel 
   1.133 +        * requests and then wait for a confirmation that the notification has 
   1.134 +        * been terminated. A failure to do so results in a panic.
   1.135 +        *
   1.136 +        * When the subsession is closed, all the session triggers owned by 
   1.137 +        * the client application are deleted by Location Triggering Server. 
   1.138 +        * Start-up triggers are not affected by this method. 
   1.139 +        * 
   1.140 +        * @panic LocTriggering ELbtRequestsNotCancelled If client application 
   1.141 +        * has requests outstanding with Location Triggering Server.
   1.142 +        */
   1.143 +        IMPORT_C void Close();
   1.144 +    
   1.145 +       /**
   1.146 +        * Creates a trigger in Location Triggering Server and returns the 
   1.147 +        * trigger Id.
   1.148 +        *
   1.149 +        * Client application may use this method to create a trigger in 
   1.150 +        * Location Triggering Server. When a trigger is created, the process 
   1.151 +        * of the client application becomes the owner process of the trigger.
   1.152 +        *
   1.153 +        * Trigger entry shall be a subclass of CLbtTriggerEntry.
   1.154 +        *
   1.155 +        * Start-up triggers are stored persistently. They can be deleted
   1.156 +        * by method RLbt::DeleteTriggerL(). Session triggers remain 
   1.157 +        * until DeleteTriggerL() is called or the client's subsession is 
   1.158 +        * closed. 
   1.159 +        *
   1.160 +        * While creating a trigger, the following attributes are mandatory 
   1.161 +        * for any type of trigger,
   1.162 +        * - Name
   1.163 +        * - Requestors
   1.164 +        * - Trigger condition
   1.165 +        *
   1.166 +        * In case of start-up trigger, the following attribute is 
   1.167 +        * also mandatory
   1.168 +        * - Process Identity
   1.169 +        *
   1.170 +        * Although manager UI is not a mandatory attribute, it's highly 
   1.171 +        * recommended that correct manager UI is specified. 
   1.172 +        *
   1.173 +        * Currently, the system only supports CLbtTriggerConditionArea
   1.174 +        * to be used as trigger condition. Following 
   1.175 +        * attributes must be specified,
   1.176 +        * - Trigger area 
   1.177 +        * - Direction
   1.178 +        *
   1.179 +        * Currently, only CLbtGeoCircle can be used as trigger area. The
   1.180 +        * center of the geographical circle must be specified. 
   1.181 +        * 
   1.182 +        * If the radius of the trigger area is not specified, minimum 
   1.183 +        * size of trigger area will be used in the created trigger entry. 
   1.184 +        * 
   1.185 +        * The trigger ID attribute is ignored while creating a trigger. If the 
   1.186 +        * trigger is successfully created, trigger ID is returned to the 
   1.187 +        * client application.  If the trigger is enabled, Location Triggering
   1.188 +        * Server will supervise the trigger and fires it when trigger 
   1.189 +        * conditions are met.
   1.190 +        *
   1.191 +        * Creating any type triggers requires @p Location capability. 
   1.192 +        * @p WriteUserData capability is required in addition to create start-up 
   1.193 +        * triggers. 
   1.194 +        *
   1.195 +        * @see CLbtTriggerEntry CLbtSessionTrigger CLbtStartupTrigger
   1.196 +        * @see CancelCreateTrigger
   1.197 +        *
   1.198 +        * @panic LocTriggering ELbtServerBadHandle If the subsession is 
   1.199 +        * not opened.
   1.200 +        *
   1.201 +        * @param[in] aTrigger The trigger to be created. Trigger Id attribute
   1.202 +        * is ignored by Location Triggering Server.
   1.203 +        * @param[out] aTriggerId Contains trigger ID of the created trigger
   1.204 +        * When the request is completed. Trigger is is unique among all triggers
   1.205 +        * currently exist in the system. If a trigger is removed from the system,
   1.206 +        * its Id may be reused by another trigger.
   1.207 +        * @param[in] aFireOnCreation The parameter specifies if the trigger
   1.208 +        * can be fired right after the creation. 
   1.209 +        * - If this parameter is ETrue. For entry type of trigger, 
   1.210 +        * if the trigger is created inside the trigger area, it is 
   1.211 +        * fired right after it is created. For exit type of trigger, if the
   1.212 +        * trigger is created outside of the trigger area, it is
   1.213 +        * fired right after it is created. 
   1.214 +        * - If this parameter is EFalse. For entry type of 
   1.215 +        * trigger, if the trigger is created inside the trigger area, it
   1.216 +        * will not be fired immediately. The trigger will be fired when 
   1.217 +        * the terminal moves outside of the trigger area and then enters 
   1.218 +        * the trigger area again. For exit type of trigger, if the trigger 
   1.219 +        * is created outside of trigger area it will be fired immediately. 
   1.220 +        * The trigger will be fired when the terminal moves into the trigger 
   1.221 +        * area and then  moves out again. 
   1.222 +        * @param[out] aStatus Contains the error code when the 
   1.223 +        * request is completed.
   1.224 +        * - KErrNone. If the trigger is created successfully.
   1.225 +        * - KErrArgument. If any of mandatory attributes are not specified, 
   1.226 +        * the manager UI is specified but it is not a valid UI application, 
   1.227 +        * or the length of the trigger name is zero or larger than 
   1.228 +        * @p KLbtMaxNameLength.
   1.229 +        * - KErrNotSupported. If the trigger condition is not 
   1.230 +        * an instance of @p CLbtTriggerConditionBasic, or if the trigger area is 
   1.231 +        * not an instance of CLbtGeoCircle. Also returned if the trigger direction
   1.232 +        * is EFireOnExit and the trigger being created is a cell based trigger.
   1.233 +        * - KErrAccessDenied. If the requestor attributes are missing, privacy 
   1.234 +        * checking by Location Server determines that any of the specified 
   1.235 +        * requestors do not have permission to retrieve location information, 
   1.236 +        * - KErrPermisionDenied. If the client application does not have 
   1.237 +        * enough capabilities to create this trigger.
   1.238 +        * - KErrTriggeringAreaTooSmall.  If the specified trigger area is 
   1.239 +        * smaller than minimum size of trigger area.
   1.240 +        * - KErrLbtMaxTriggerLimitExceeded. If creating startup trigger exceeds
   1.241 +        * the system defined limit.
   1.242 +        * - KErrDiskFull. Disk full when creating a start-up trigger.
   1.243 +        * - Other standard Symbian error code, such as KErrNoMemory, 
   1.244 +        * KErrServerBusy, KErrGeneral. If the operation fails. 
   1.245 +        */
   1.246 +        IMPORT_C void CreateTrigger( 
   1.247 +            const CLbtTriggerEntry& aTrigger,
   1.248 +            TLbtTriggerId& aTriggerId,
   1.249 +            TBool aFireOnCreation,
   1.250 +            TRequestStatus& aStatus );
   1.251 +            
   1.252 +       /**
   1.253 +        * Cancel trigger creation.
   1.254 +        *
   1.255 +        * This function does not require any capabilities. 
   1.256 +        *
   1.257 +        * @see CreateTriggerL
   1.258 +        */
   1.259 +        IMPORT_C void CancelCreateTrigger();
   1.260 +            
   1.261 +       /**
   1.262 +        * Deletes a specific trigger from Location Triggering Server.
   1.263 +        * 
   1.264 +        * Client applications can only delete triggers owned by it. 
   1.265 +        *
   1.266 +        * Deleting any type triggers requires @p Location capability. 
   1.267 +        * @p WriteUserData capability is required in addition to delete start-up 
   1.268 +        * triggers. 
   1.269 +        *
   1.270 +        * @panic LocTriggering ELbtServerBadHandle If the subsession is not opened.
   1.271 +        *
   1.272 +        * @param[in] aId The ID of the trigger to be deleted.
   1.273 +        *
   1.274 +        * @leave KErrNotFound If the specified trigger is not found or
   1.275 +        * it is not owned by the client application.
   1.276 +        * @leave KErrInUse If the previous write or delete operation on the
   1.277 +        * trigger is not completed yet.
   1.278 +        * @leave Other standard Symbian error code, such as KErrNoMemory,
   1.279 +        * KErrServerBusy, KErrGeneral, etc.
   1.280 +        */
   1.281 +        IMPORT_C void DeleteTriggerL( TLbtTriggerId aId );
   1.282 +
   1.283 +       /**
   1.284 +        * Delete triggers that are owned by the client application and fulfill 
   1.285 +        * the specified criteria. 
   1.286 +        *
   1.287 +        * If none of the triggers that belong to the client application 
   1.288 +        * fulfill the specified criteria, the method leaves with KErrNotFound.
   1.289 +        *
   1.290 +        * If only a part of the triggers that fullfill the criteria belong to 
   1.291 +        * the client application, then only those triggers belonging to that 
   1.292 +        * client application would be deleted and the method would complete 
   1.293 +        * without any leave.
   1.294 +        * 
   1.295 +        * If no filter is specified, all triggers owned by the client 
   1.296 +        * application are deleted.
   1.297 +        *
   1.298 +        * Deleting any type triggers requires @p Location capability. 
   1.299 +        * @p WriteUserData capability is required in addition to delete 
   1.300 +        * start-up triggers. 
   1.301 +        * 
   1.302 +        * @panic LocTriggering ELbtServerBadHandle If the subsession is not 
   1.303 +        * opened.
   1.304 +        *
   1.305 +        * @param[in] aFilter Specify the filter for the delete operation. 
   1.306 +        * Trigger entries that fulfill the criteria will be deleted 
   1.307 +        * from Location Triggering Server. By default, no filter is used.
   1.308 +        * In this case, all triggers owned by the client applications 
   1.309 +        * will be deleted.
   1.310 +        * @leave KErrNotSupported If there is an area filter used and the area
   1.311 +        * is not a type of geographical circular or rectangular area.
   1.312 +        * @leave KErrNotFound If no trigger belonging to the client application
   1.313 +        * fullfills the criteria specified.
   1.314 +        * @leave Other standard Symbian error code, such as KErrNoMemory,
   1.315 +        * KErrServerBusy, KErrGeneral, etc.
   1.316 +        */
   1.317 +        IMPORT_C void DeleteTriggersL( 
   1.318 +            CLbtTriggerFilterBase* aFilter = NULL );
   1.319 +
   1.320 +       /**
   1.321 +        * Delete triggers asynchronously. Triggers to be deleted must be owned
   1.322 +        * by the client application and fulfill the specified criteria.
   1.323 +        *
   1.324 +        * If no trigger that belong to the client application fulfills the 
   1.325 +        * specified criteria, the method completes the client request
   1.326 +        * with KErrNotFound.
   1.327 +        *
   1.328 +        * If only a part of the triggers that fullfill the criteria belong to 
   1.329 +        * the client application, then only those triggers belonging to that 
   1.330 +        * client application would be deleted and the method would complete 
   1.331 +        * without any error.
   1.332 +        *
   1.333 +        * If no filter is specified, all triggers owned by the client 
   1.334 +        * application are deleted.
   1.335 +        *
   1.336 +        * Deleting any type triggers requires @p Location capability. 
   1.337 +        * @p WriteUserData capability is required in addition to delete start-up 
   1.338 +        * triggers. 
   1.339 +        * 
   1.340 +        * @panic LocTriggering ELbtServerBadHandle If the subsession is not
   1.341 +        * opened.
   1.342 +        *
   1.343 +        * @param[out] aStatus Contains the error code when the 
   1.344 +        * request is completed.
   1.345 +        * - KErrNone If the operation was successful.
   1.346 +        * - KErrNotFound If no trigger belonging to the client application
   1.347 +        * fullfills the criteria specified.
   1.348 +        * - Other standard Symbian error code, such as KErrNoMemory,
   1.349 +        * KErrServerBusy, KErrGeneral, etc.
   1.350 +        * @param[in] aFilter Specify the filter for the delete operation. 
   1.351 +        * Trigger entries that fulfill the criteria will be deleted 
   1.352 +        * from Location Triggering Server. Default value is NULL in which case
   1.353 +        * all triggers owned by the client applications will be deleted.
   1.354 +        */
   1.355 +        IMPORT_C void DeleteTriggers( 
   1.356 +            TRequestStatus& aStatus, 
   1.357 +            CLbtTriggerFilterBase* aFilter = NULL );
   1.358 +
   1.359 +       /**
   1.360 +        * Delete triggers based on a list of trigger Ids. The triggers to 
   1.361 +        * be deleted must be owned by the client application. 
   1.362 +        *
   1.363 +        * If none of the triggers to be deleted are owned by the client 
   1.364 +        * application then no triggers would be deleted and this method 
   1.365 +        * will leave with KErrNotFound.
   1.366 +        *
   1.367 +        * If the list is empty, no trigger will be deleted and this method 
   1.368 +        * completes without any leave. 
   1.369 +        * 
   1.370 +        * In the case where a list of trigger IDs are mentioned of which only 
   1.371 +        * a few of those belong to the client, then only all those triggers 
   1.372 +        * that belong to the client will be deleted and the rest ignored. The 
   1.373 +        * method will complete without any leave in this case.
   1.374 +        * 
   1.375 +        * Deleting any type of triggers requires @p Location capability. 
   1.376 +        * @p WriteUserData capability is required in addition to delete start-up 
   1.377 +        * triggers. 
   1.378 +        * 
   1.379 +        * @panic LocTriggering ELbtServerBadHandle If the subsession is not opened.
   1.380 +        *
   1.381 +        * @param[in] aTriggerIdList The list contains IDs of the triggers
   1.382 +        * that are to be deleted. 
   1.383 +        * @leave Other standard Symbian error code, such as KErrNoMemory,
   1.384 +        * KErrServerBusy, KErrGeneral, etc.
   1.385 +        */
   1.386 +        IMPORT_C void DeleteTriggersL( 
   1.387 +            const RArray<TLbtTriggerId> &aTriggerIdList );
   1.388 +
   1.389 +       /**
   1.390 +        * Delete triggers asynchronously based on a list of trigger Ids. 
   1.391 +        * The triggers to be deleted must be owned by the client application.
   1.392 +        *
   1.393 +        * If none of the triggers to be deleted are owned by the client 
   1.394 +        * application then no triggers would be deleted and this method 
   1.395 +        * will complete the request with KErrNotFound.
   1.396 +        * 
   1.397 +        * If the list is empty, no trigger will be deleted and this method 
   1.398 +        * completes without any error code.
   1.399 +        * 
   1.400 +        * In the case where a list of trigger IDs are mentioned of which only 
   1.401 +        * a few of those belong to the client, then only all those triggers 
   1.402 +        * that belong to the client will be deleted and the rest ignored. The 
   1.403 +        * method will complete without any leave in this case.
   1.404 +        *
   1.405 +        * Deleting any type of triggers requires @p Location capability. 
   1.406 +        * @p WriteUserData capability is required in addition to delete 
   1.407 +        * start-up triggers. 
   1.408 +        * 
   1.409 +        * @panic LocTriggering ELbtServerBadHandle If the subsession is not 
   1.410 +        * opened.
   1.411 +        *
   1.412 +        * @param[in] aTriggerIdList The list contains IDs of the triggers
   1.413 +        * that are to be deleted. 
   1.414 +        * @param[out] aStatus Contains the error code when the 
   1.415 +        * request is completed.
   1.416 +        * - KErrNone If the operation was succeed.
   1.417 +        * - Other standard Symbian error code, such as KErrNoMemory,
   1.418 +        * KErrServerBusy, KErrGeneral, etc.
   1.419 +        */
   1.420 +        IMPORT_C void DeleteTriggers( 
   1.421 +            const RArray<TLbtTriggerId>& aTriggerIdList,
   1.422 +            TRequestStatus& aStatus );
   1.423 +        
   1.424 +       /**
   1.425 +        * Cancel delete triggers operation.
   1.426 +        *
   1.427 +        * This function does not require any capabilities. 
   1.428 +        *
   1.429 +        * @see DeleteTriggers
   1.430 +        */
   1.431 +        IMPORT_C void CancelDeleteTriggers();     
   1.432 +
   1.433 +       /**
   1.434 +        * Gets the specified trigger from Location Triggering Server. 
   1.435 +        * 
   1.436 +        * Client application takes the ownership ofthe returned trigger object.
   1.437 +        * The returned trigger object is left in cleanup stack when the 
   1.438 +        * trigger entry is successfully retrieved.
   1.439 +        *
   1.440 +        * Each trigger entry object consumes about 100 - 200 bytes user heap,
   1.441 +        * if all attributes are filled. To save memory usage, 
   1.442 +        * client applications can retrieve trigger object with only partial 
   1.443 +        * attributes filled. 
   1.444 +        *
   1.445 +        * This method requires @p Location capability. 
   1.446 +        *
   1.447 +        * @panic LocTriggering ELbtServerBadHandle If the subsession is not 
   1.448 +        * opened.
   1.449 +        * @param[in] aId The ID of the trigger to be retrieved.
   1.450 +        * @param[in] aEntryFieldMask The trigger entry's attribute field mask.
   1.451 +        * It specifies what attributes shall be filled in the returned 
   1.452 +        * trigger object. The default value is KLbtTriggerAttributeFieldsAll, 
   1.453 +        * which means all attributes field will be filled. Wether the trigger ID 
   1.454 +        * attribute is specified or not in this mask, the returned 
   1.455 +        * trigger object always contains a valid trigger Id.
   1.456 +        * @param[in] aDynInfoFieldMask Specifies which dynamic information
   1.457 +        * field shall be filled in the returned object. The default value is
   1.458 +        * KLbtTriggerDynInfoFieldsAll, which means all dynamic information
   1.459 +        * fields will be filled.
   1.460 +        * @return The retrieved trigger object. Ownership of the object is
   1.461 +        * transferred to the client application.
   1.462 +        * @leave KErrNotFound If the specified trigger is not found or it's
   1.463 +        * not owned by the client application.
   1.464 +        * @leave Other standard Symbian error code, such as KErrNoMemory,
   1.465 +        * KErrServerBusy, KErrGeneral, etc.
   1.466 +        */
   1.467 +        IMPORT_C CLbtTriggerInfo* GetTriggerLC( 
   1.468 +            TLbtTriggerId aId,
   1.469 +            TLbtTriggerAttributeFieldsMask aEntryFieldMask = 
   1.470 +                KLbtTriggerAttributeFieldsAll,
   1.471 +            TLbtTriggerDynamicInfoFieldsMask  aDynInfoFieldMask = 
   1.472 +                KLbtTriggerDynInfoFieldsAll );
   1.473 +
   1.474 +       /**
   1.475 +        * Changes the attributes of the specified trigger.
   1.476 +        *
   1.477 +        * Client applications can use this method to change attributes of a
   1.478 +        * specified trigger that is owned by it. Client applications can
   1.479 +        * only update triggers owned by itself.
   1.480 +        *
   1.481 +        * Some attributes are not modifiable after the trigger is created. Trying 
   1.482 +        * to change the following attributes will generate a leave with 
   1.483 +        * error code KErrAccessDenied.
   1.484 +        * 
   1.485 +        * For any type of the trigger, the following attributes can't be
   1.486 +        * modified after the trigger is created.
   1.487 +        * - ID
   1.488 +        * - Requestor
   1.489 +        * - Manager UI
   1.490 +        *
   1.491 +        * The following attribute can't be modified in addition for 
   1.492 +        * start-up triggers.
   1.493 +        * - Trigger handling process identity
   1.494 +        * - Trigger handling process SID
   1.495 +        *
   1.496 +        * If the specified trigger does not belong to the client application 
   1.497 +        * the method leaves with KErrNotFound.
   1.498 +        *
   1.499 +        * Updating any type triggers requires @p Location capability. 
   1.500 +        * @p WriteUserData capability is required in addition to update start-up 
   1.501 +        * triggers. 
   1.502 +        *
   1.503 +        * @panic LocTriggering ELbtServerBadHandle If the subsession is not opened.
   1.504 +        *
   1.505 +        * @param[in] aTrigger The trigger object to be updated in Location 
   1.506 +        * Triggering Server. The trigger ID identifies the trigger to be updated.
   1.507 +        * @param[in] aFieldMask Specifies the attribute fields that are valid in 
   1.508 +        * the aTrigger and shall be updated to the trigger. Trigger ID
   1.509 +        * field in aTrigger is always used regardless whether the trigger ID 
   1.510 +        * field is marked or not in the mask. The attribute value in aTrigger 
   1.511 +        * is ignored if the attribute field in aFieldMask is not marked.
   1.512 +        * @param[in] aFireOnUpdate The parameter specifies if the trigger
   1.513 +        * can be fired right after the update operation. 
   1.514 +        * - If this parameter is ETrue. For entry type of trigger, 
   1.515 +        * if the trigger is updated inside the trigger area, it is 
   1.516 +        * fired right after it is updated. For exit type of trigger, if the
   1.517 +        * trigger is updated outside of the trigger area, it is
   1.518 +        * fired right after it is updated. 
   1.519 +        * - If this parameter is EFalse. For entry type of 
   1.520 +        * trigger, if the trigger is updated inside the trigger area, it
   1.521 +        * will not be fired immediately. The trigger will be fired when 
   1.522 +        * the terminal moves outside of the trigger area and then enters 
   1.523 +        * the trigger area again. For exit type of trigger, if the trigger 
   1.524 +        * is updated outside of trigger area it will be fired immediately. 
   1.525 +        * The trigger will be fired when the terminal moves into the trigger 
   1.526 +        * area and then  moves out again. 
   1.527 +        * @leave KErrNotFound If the specified trigger is not found or it's
   1.528 +        * not owned by the client application.
   1.529 +        * @leave KErrAccessDenied If the client application tries to change 
   1.530 +        * the attributes which are not modifiable.
   1.531 +        * @leave KErrArgument If the length of trigger name is zero or 
   1.532 +        * larger than @p KLbtMaxNameLength. 
   1.533 +        * @leave Other standard Symbian error code, such as KErrNoMemory,
   1.534 +        * KErrServerBusy, KErrGeneral, etc.
   1.535 +        */
   1.536 +        IMPORT_C void UpdateTriggerL( 
   1.537 +            const CLbtTriggerEntry& aTrigger,
   1.538 +            TLbtTriggerAttributeFieldsMask aFieldMask,
   1.539 +            TLbtFireOnUpdate aFireOnUpdate );
   1.540 +            
   1.541 +            
   1.542 +       /**
   1.543 +        * Changes the attributes of the specified trigger asynchronously
   1.544 +        *
   1.545 +        * Client applications can use this method to change attributes of a
   1.546 +        * specified trigger that is owned by it. Client applications can
   1.547 +        * only update triggers owned by itself.
   1.548 +        *
   1.549 +        * Some attributes are not modifiable after the trigger is created. Trying 
   1.550 +        * to change the following attributes will generate a leave with 
   1.551 +        * error code KErrAccessDenied.
   1.552 +        * 
   1.553 +        * For any type of the trigger, the following attributes can't be
   1.554 +        * modified after the trigger is created.
   1.555 +        * - ID
   1.556 +        * - Requestor
   1.557 +        * - Manager UI
   1.558 +        *
   1.559 +        * The following attribute can't be modified in addition for 
   1.560 +        * start-up triggers.
   1.561 +        * - Trigger handling process identity
   1.562 +        * - Trigger handling process SID
   1.563 +        *
   1.564 +        * If the specified trigger does not belong to the client application 
   1.565 +        * the method leaves with KErrNotFound.
   1.566 +        *
   1.567 +        * Updating any type triggers requires @p Location capability. 
   1.568 +        * @p WriteUserData capability is required in addition to update start-up 
   1.569 +        * triggers. 
   1.570 +        *
   1.571 +        * @panic LocTriggering ELbtServerBadHandle If the subsession is not opened.
   1.572 +        *
   1.573 +        * @param[in] aTrigger The trigger object to be updated in Location 
   1.574 +        * Triggering Server. The trigger ID identifies the trigger to be updated.
   1.575 +        * @param[in] aFieldMask Specifies the attribute fields that are valid in 
   1.576 +        * the aTrigger and shall be updated to the trigger. Trigger ID
   1.577 +        * field in aTrigger is always used regardless whether the trigger ID 
   1.578 +        * field is marked or not in the mask. The attribute value in aTrigger 
   1.579 +        * is ignored if the attribute field in aFieldMask is not marked.
   1.580 +        * @param[in] aFireOnUpdate The parameter specifies if the trigger
   1.581 +        * can be fired right after the update operation. 
   1.582 +        * - If this parameter is ETrue. For entry type of trigger, 
   1.583 +        * if the trigger is updated inside the trigger area, it is 
   1.584 +        * fired right after it is updated. For exit type of trigger, if the
   1.585 +        * trigger is updated outside of the trigger area, it is
   1.586 +        * fired right after it is updated. 
   1.587 +        * - If this parameter is EFalse. For entry type of 
   1.588 +        * trigger, if the trigger is updated inside the trigger area, it
   1.589 +        * will not be fired immediately. The trigger will be fired when 
   1.590 +        * the terminal moves outside of the trigger area and then enters 
   1.591 +        * the trigger area again. For exit type of trigger, if the trigger 
   1.592 +        * is updated outside of trigger area it will be fired immediately. 
   1.593 +        * The trigger will be fired when the terminal moves into the trigger 
   1.594 +        * area and then  moves out again. 
   1.595 +        * @leave KErrNotFound If the specified trigger is not found or it's
   1.596 +        * not owned by the client application.
   1.597 +        * @leave KErrAccessDenied If the client application tries to change 
   1.598 +        * the attributes which are not modifiable.
   1.599 +        * @leave KErrArgument If the length of trigger name is zero or 
   1.600 +        * larger than @p KLbtMaxNameLength. 
   1.601 +        * @leave Other standard Symbian error code, such as KErrNoMemory,
   1.602 +        * KErrServerBusy, KErrGeneral, etc.
   1.603 +        */
   1.604 +        IMPORT_C void UpdateTrigger( 
   1.605 +            const CLbtTriggerEntry& aTrigger,
   1.606 +            TLbtTriggerAttributeFieldsMask aFieldMask,
   1.607 +            TLbtFireOnUpdate aFireOnUpdate,
   1.608 +            TRequestStatus& aStatus );            
   1.609 +    	
   1.610 +    	  /**
   1.611 +        * Cancel update trigger operation.
   1.612 +        *
   1.613 +        * This function does not require any capabilities. 
   1.614 +        *
   1.615 +        * @see UpdateTrigger
   1.616 +        */
   1.617 +        IMPORT_C void CancelUpdateTrigger();     
   1.618 +        
   1.619 +       /**
   1.620 +        * Sets the state of the specified trigger. Client application can 
   1.621 +        * change the state of only triggers owned by it.
   1.622 +        * 
   1.623 +        * To enable the trigger, set the trigger state to
   1.624 +        * @p ELbtTriggerEnabled. To disable the trigger, 
   1.625 +        * set the trigger state to @p ELbtTriggerDisabled.
   1.626 +        *
   1.627 +        * Changing state of any type triggers requires @p Location capability. 
   1.628 +        * @p WriteUserData capability is required in addition to change state of 
   1.629 +        * start-up triggers. 
   1.630 +        *
   1.631 +        * @panic LocTriggering ELbtServerBadHandle If the subsession is not opened.
   1.632 +        *
   1.633 +        * @param[in] aId The ID of the trigger whose state will be updated.
   1.634 +        * @param[in] aState New state of the specified trigger.
   1.635 +        * @param[in] aFireOnUpdate The parameter specifies if the trigger
   1.636 +        * can be fired right after the update operation. 
   1.637 +        * - If this parameter is ETrue. For entry type of trigger, 
   1.638 +        * if the trigger is updated inside the trigger area, it is 
   1.639 +        * fired right after it is updated. For exit type of trigger, if the
   1.640 +        * trigger is updated outside of the trigger area, it is
   1.641 +        * fired right after it is updated. 
   1.642 +        * - If this parameter is EFalse. For entry type of 
   1.643 +        * trigger, if the trigger is updated inside the trigger area, it
   1.644 +        * will not be fired immediately. The trigger will be fired when 
   1.645 +        * the terminal moves outside of the trigger area and then enters 
   1.646 +        * the trigger area again. For exit type of trigger, if the trigger 
   1.647 +        * is updated outside of trigger area it will be fired immediately. 
   1.648 +        * The trigger will be fired when the terminal moves into the trigger 
   1.649 +        * area and then  moves out again.        
   1.650 +        * @leave KErrNotFound If the specified trigger is not found or it's
   1.651 +        * not owned by the client application.
   1.652 +        * @leave Other standard Symbian error code, such as KErrNoMemory,
   1.653 +        * KErrServerBusy, KErrGeneral, etc.
   1.654 +        */
   1.655 +        IMPORT_C void SetTriggerStateL( 
   1.656 +            TLbtTriggerId aId, 
   1.657 +            CLbtTriggerEntry::TLbtTriggerState aState,
   1.658 +            TLbtFireOnUpdate aFireOnUpdate );
   1.659 +
   1.660 +       /**
   1.661 +        * Sets state of multiple triggers. Client application can change state
   1.662 +        * of only triggers owned by it.
   1.663 +        *
   1.664 +        * If a filter is specified, all triggers that fulfill the criteria 
   1.665 +        * and owned by the requesting client application will be affected.
   1.666 +        * 
   1.667 +        * If no filter is specified, all triggers owned by the client 
   1.668 +        * application will be affected.
   1.669 +        *
   1.670 +        * If no trigger owned by the client application fulfills the specified 
   1.671 +        * criteria, no trigger will be modified and the method leaves with
   1.672 +        * KErrNotFound.
   1.673 +        *
   1.674 +        * Changing state of any type triggers requires @p Location capability. 
   1.675 +        * @p WriteUserData capability is required in addition to change state of 
   1.676 +        * start-up triggers. 
   1.677 +        *
   1.678 +        * @panic LocTriggering ELbtServerBadHandle If the subsession is not opened.
   1.679 +        *
   1.680 +        * @param[in] aState New state of the triggers.
   1.681 +        * @param[in] aFireOnUpdate The parameter specifies if the trigger
   1.682 +        * can be fired right after the update operation. 
   1.683 +        * - If this parameter is ETrue. For entry type of trigger, 
   1.684 +        * if the trigger is updated inside the trigger area, it is 
   1.685 +        * fired right after it is updated. For exit type of trigger, if the
   1.686 +        * trigger is updated outside of the trigger area, it is
   1.687 +        * fired right after it is updated. 
   1.688 +        * - If this parameter is EFalse. For entry type of 
   1.689 +        * trigger, if the trigger is updated inside the trigger area, it
   1.690 +        * will not be fired immediately. The trigger will be fired when 
   1.691 +        * the terminal moves outside of the trigger area and then enters 
   1.692 +        * the trigger area again. For exit type of trigger, if the trigger 
   1.693 +        * is updated outside of trigger area it will be fired immediately. 
   1.694 +        * The trigger will be fired when the terminal moves into the trigger 
   1.695 +        * area and then  moves out again.        
   1.696 +        * @param[in] aFilter The filter to be used. Triggers that fulfill
   1.697 +        * the criteria of the specified filter will be affected. 
   1.698 +        * Default value is NULL in which case all triggers owned by the client 
   1.699 +        * application will be updated.
   1.700 +        * @leave KErrNotSupported If there is an area filter used and the area
   1.701 +        * is not a type of geographical circular or rectangular area.
   1.702 +        * @leave Other standard Symbian error code, such as KErrNoMemory,
   1.703 +        * KErrServerBusy, KErrGeneral, etc.
   1.704 +        */
   1.705 +        IMPORT_C void SetTriggersStateL( 
   1.706 +            CLbtTriggerEntry::TLbtTriggerState aState,
   1.707 +            TLbtFireOnUpdate aFireOnUpdate,
   1.708 +            CLbtTriggerFilterBase* aFilter = NULL );
   1.709 +
   1.710 +       /**
   1.711 +        * Sets state of multiple triggers asynchronously.
   1.712 +        *
   1.713 +        * If a filter is specified, all triggers owned by the client 
   1.714 +        * application that fulfill the  criteria will be affected.
   1.715 +        *
   1.716 +        * If no filter is specified, all triggers owned by the client 
   1.717 +        * application will be affected.
   1.718 +        *
   1.719 +        * If no trigger that are owned by the client application fulfills the
   1.720 +        * specified criteria, no trigger will be modified and this completes 
   1.721 +        * with KErrNotFound.
   1.722 +        *
   1.723 +        * Changing state of any type triggers requires @p Location capability. 
   1.724 +        * @p WriteUserData capability is required in addition to change state of 
   1.725 +        * start-up triggers. 
   1.726 +        *
   1.727 +        * @panic LocTriggering ELbtServerBadHandle If the subsession is not opened.
   1.728 +        *
   1.729 +        * @param[out] aStatus Contains the error code when the 
   1.730 +        * request is completed.
   1.731 +        * - KErrNotSupported If there is an area filter used and the area
   1.732 +        * is not a type of geographical circular or rectangular area.
   1.733 +        * - Other standard Symbian error code, such as KErrNoMemory,
   1.734 +        * KErrServerBusy, KErrGeneral, etc.
   1.735 +        * @param[in] aState New state of the triggers.
   1.736 +        * @param[in] aFireOnUpdate The parameter specifies if the trigger
   1.737 +        * can be fired right after the update operation. 
   1.738 +        * - If this parameter is ETrue. For entry type of trigger, 
   1.739 +        * if the trigger is updated inside the trigger area, it is 
   1.740 +        * fired right after it is updated. For exit type of trigger, if the
   1.741 +        * trigger is updated outside of the trigger area, it is
   1.742 +        * fired right after it is updated. 
   1.743 +        * - If this parameter is EFalse. For entry type of 
   1.744 +        * trigger, if the trigger is updated inside the trigger area, it
   1.745 +        * will not be fired immediately. The trigger will be fired when 
   1.746 +        * the terminal moves outside of the trigger area and then enters 
   1.747 +        * the trigger area again. For exit type of trigger, if the trigger 
   1.748 +        * is updated outside of trigger area it will be fired immediately. 
   1.749 +        * The trigger will be fired when the terminal moves into the trigger 
   1.750 +        * area and then  moves out again.        
   1.751 +        * @param[in] aFilter The filter to be used. Triggers that fulfill
   1.752 +        * the criteria of the specified filter will be affected. 
   1.753 +        * Default is value is NULL in which case all triggers owned by the 
   1.754 +        * client application will be updated.
   1.755 +        */
   1.756 +        IMPORT_C void SetTriggersState( 
   1.757 +            TRequestStatus& aStatus,
   1.758 +            CLbtTriggerEntry::TLbtTriggerState aState,
   1.759 +            TLbtFireOnUpdate aFireOnUpdate,
   1.760 +            CLbtTriggerFilterBase* aFilter = NULL );
   1.761 +        
   1.762 +       /**
   1.763 +        * Cancel set trigger state operation.
   1.764 +        *
   1.765 +        * This function does not require any capabilities. 
   1.766 +        *
   1.767 +        * @see SetTriggersState
   1.768 +        */
   1.769 +        IMPORT_C void CancelSetTriggersState();     
   1.770 +
   1.771 +       /**
   1.772 +        * Lists IDs of triggers that are owned by the client application.
   1.773 +        * 
   1.774 +        * Client applications can specify options used in retrieving 
   1.775 +        * trigger IDs.
   1.776 +        * 
   1.777 +        * This method requires @p Location capability. 
   1.778 +        *
   1.779 +        * @see CLbtListTriggerOptions
   1.780 +        *
   1.781 +        * @panic LocTriggering ELbtServerBadHandle If the subsession is not opened.
   1.782 +        *
   1.783 +        * @param[out] aTriggerIdList On return, aTriggerIdList contains IDs of
   1.784 +        * retrieved triggers. The content of aTriggerIdList will be cleared 
   1.785 +        * even if this function fails.
   1.786 +        * @param[in] aListOptions Specified the options used for listing 
   1.787 +        * triggers. By default, the value is NULL. In this case, all triggers
   1.788 +        * owned by the client application will be retrieved. 
   1.789 +        * @leave KErrNotSupported If there is an area filter used and the area
   1.790 +        * is not a type of geographical circular or rectangular area.
   1.791 +        * @leave Other standard Symbian error code, such as KErrNoMemory,
   1.792 +        * KErrServerBusy, KErrGeneral, etc.
   1.793 +        */
   1.794 +        IMPORT_C void ListTriggerIdsL( 
   1.795 +            RArray < TLbtTriggerId >& aTriggerIdList,
   1.796 +            CLbtListTriggerOptions* aListOptions = NULL );
   1.797 +
   1.798 +       /**
   1.799 +        * Lists asynchronously IDs of triggers that are owned by the 
   1.800 +        * client application.
   1.801 +        * 
   1.802 +        * Client applications can specify options used in retrieving 
   1.803 +        * trigger IDs.
   1.804 +        * 
   1.805 +        * This method requires @p Location capability. 
   1.806 +        *
   1.807 +        * @see CLbtListTriggerOptions
   1.808 +        *
   1.809 +        * @panic LocTriggering ELbtServerBadHandle If the subsession is not 
   1.810 +        * opened.
   1.811 +        *
   1.812 +        * @param[out] aStatus Contains the error code when the 
   1.813 +        * request is completed. KErrNotSupported is returned if there is an area 
   1.814 +        * filter used and the area is not a type of geographical circular or 
   1.815 +        * rectangular area.
   1.816 +        * - KErrNotSupported If there is an area filter used and the area
   1.817 +        * is not a type of geographical circular or rectangular area.
   1.818 +        * - Other standard Symbian error code, such as KErrNoMemory,
   1.819 +        * KErrServerBusy, KErrGeneral, etc.
   1.820 +        * @param[out] aTriggerIdList On return, aTriggerIdList contains IDs of
   1.821 +        * retrieved triggers. The content of aTriggerIdList will be cleared 
   1.822 +        * even if this function fails.
   1.823 +        * @param[in] aListOptions Specified the options used for listing 
   1.824 +        * triggers. Default value is NULL in which case all triggers owned by 
   1.825 +        * the client application will be retrieved. 
   1.826 +        */
   1.827 +        IMPORT_C void ListTriggerIds( 
   1.828 +            TRequestStatus& aStatus,
   1.829 +            RArray < TLbtTriggerId >& aTriggerIdList,
   1.830 +            CLbtListTriggerOptions* aListOptions = NULL );
   1.831 +            
   1.832 +       /**
   1.833 +        * Cancel list trigger ids operation.
   1.834 +        *
   1.835 +        * This function does not require any capabilities. 
   1.836 +        *
   1.837 +        * @see ListTriggerIds
   1.838 +        */
   1.839 +        IMPORT_C void CancelListTriggerIds();    
   1.840 +
   1.841 +       /**
   1.842 +        * Gets triggers from Location Triggering Server. A client application
   1.843 +        * can only retrieve triggers owned by it.
   1.844 +        * 
   1.845 +        * Client applications can specify options used in retrieving triggers.
   1.846 +        * Ownership of the returned trigger objects is transferred to 
   1.847 +        * the client application.
   1.848 +        *
   1.849 +        * Note: This function may require large free heap memory from
   1.850 +        * the client application depending on the number of triggers to 
   1.851 +        * be retrieved and the attributes to be filled.
   1.852 +        *
   1.853 +        * This method requires @p Location capability. 
   1.854 +        *
   1.855 +        * @see CLbtListTriggerOptions
   1.856 +        *
   1.857 +        * @panic LocTriggering ELbtServerBadHandle If the subsession is not 
   1.858 +        * opened.
   1.859 +        *
   1.860 +        * @param[out] aTriggerList On return, contains trigger objects retrieved
   1.861 +        * from Location Triggering Server. The content of aTriggerList is
   1.862 +        * cleared even if this function fails. The ownership of the returned 
   1.863 +        * pointers is transfered to the client application. 
   1.864 +        * @param[in] aListOptions Specifies the options for listing triggers. 
   1.865 +        * By default, the value is NULL. In this case all triggers
   1.866 +        * owned by the client application will be retrieved. 
   1.867 +        * @leave KErrNotSupported If there is an area filter used and the area
   1.868 +        * is not a type of geographical circular or rectangular area.
   1.869 +        * @leave Other standard Symbian error code, such as KErrNoMemory,
   1.870 +        * KErrServerBusy, KErrGeneral, etc.
   1.871 +        */
   1.872 +        IMPORT_C void GetTriggersL( 
   1.873 +            RPointerArray < CLbtTriggerInfo >& aTriggerList,
   1.874 +            CLbtListTriggerOptions* aListOptions = NULL );
   1.875 +        
   1.876 +       /**
   1.877 +        * Gets triggers asynchronously from Location Triggering Server. A 
   1.878 +        * client application can only retrieve triggers owned by it.
   1.879 +        * 
   1.880 +        * Client applications can specify options used in retrieving triggers.
   1.881 +        * Ownership of the returned trigger objects is transferred to 
   1.882 +        * the client application.
   1.883 +        *
   1.884 +        * Note: This function may require large free heap memory from
   1.885 +        * the client application depending on the number of triggers to 
   1.886 +        * be retrieved and the attributes to be filled.
   1.887 +        *
   1.888 +        * This method requires @p Location capability. 
   1.889 +        *
   1.890 +        * @see CLbtListTriggerOptions
   1.891 +        *
   1.892 +        * @panic LocTriggering ELbtServerBadHandle If the subsession is not opened.
   1.893 +        *
   1.894 +        * @param[out] aStatus Contains the error code when the 
   1.895 +        * request is completed. 
   1.896 +        * - KErrNotSupported. If there is an area 
   1.897 +        * filter used and the area is not a type of geographical circular or 
   1.898 +        * rectangular area.
   1.899 +        * - Other standard Symbian error code, such as KErrNoMemory,
   1.900 +        * KErrServerBusy, KErrGeneral, etc.
   1.901 +        * @param[out] aTriggerList On return, contains trigger objects retrieved
   1.902 +        * from Location Triggering Server. The content of aTriggerList is
   1.903 +        * cleared even if this function fails. The ownership of the returned 
   1.904 +        * pointers is transfered to the client application. 
   1.905 +        * @param[in] aListOptions Specifies the options for listing triggers. 
   1.906 +        * By default, the value is NULL. In this case all triggers
   1.907 +        * owned by the client application will be retrieved. 
   1.908 +        */
   1.909 +        IMPORT_C void GetTriggers( 
   1.910 +            TRequestStatus& aStatus,
   1.911 +            RPointerArray < CLbtTriggerInfo >& aTriggerList,
   1.912 +            CLbtListTriggerOptions* aListOptions = NULL );
   1.913 +            
   1.914 +       /**
   1.915 +        * Cancel get triggers operation.
   1.916 +        *
   1.917 +        * This function does not require any capabilities. 
   1.918 +        *
   1.919 +        * @see GetTriggers
   1.920 +        */
   1.921 +        IMPORT_C void CancelGetTriggers();    
   1.922 +
   1.923 +       /**
   1.924 +        * Creates an iterator in Location Triggering Server to retrieve
   1.925 +        * trigger objects incrementally. 
   1.926 +        * 
   1.927 +        * An iterator must be created before GetNextTriggerLC() can be called.
   1.928 +        * The iterator is constructed in the server side and it is subsession
   1.929 +        * specific. Calling this function again will reset the iterator.
   1.930 +        * After the iterator is constructed, the client application calls 
   1.931 +        * GetNextTriggerLC() repeatedly to retrieve all interested trigger 
   1.932 +        * objects. Note, client applications can only get triggers owned by
   1.933 +        * itself.
   1.934 +        *
   1.935 +        * If any trigger is changed during iteration, the client application
   1.936 +        * shall call this method again to reset the iterator and get the 
   1.937 +        * triggers again incrementally.
   1.938 +        *
   1.939 +        * This method requires @p Location capability. 
   1.940 +        *
   1.941 +        * @see CLbtListTriggerOptions
   1.942 +        *
   1.943 +        * @panic LocTriggering  ELbtServerBadHandle If the subsession is not opened.
   1.944 +        *
   1.945 +        * @param[in] aListOptions Specifies the options used for listing 
   1.946 +        * triggers. Default value is NULL, which will retrieve all triggers
   1.947 +        * owned by the client application. 
   1.948 +        * @leave KErrNotSupported If there is an area filter used and the area
   1.949 +        * is not a type of geographical circular or rectangular area.
   1.950 +        * @leave Other standard Symbian error code, such as KErrNoMemory,
   1.951 +        * KErrServerBusy, KErrGeneral, etc.
   1.952 +        */
   1.953 +        IMPORT_C void CreateGetTriggerIteratorL( 
   1.954 +            CLbtListTriggerOptions* aListOptions = NULL );
   1.955 +
   1.956 +       /**
   1.957 +        * Creates an iterator asynchronously in Location Triggering Server 
   1.958 +        * to retrieve trigger objects incrementally. 
   1.959 +        * 
   1.960 +        * An iterator must be created before GetNextTriggerLC() can be called.
   1.961 +        * The iterator is constructed in the server side and it is subsession
   1.962 +        * specific. Calling this function again will reset the iterator.
   1.963 +        * After the iterator is constructed, the client application calls 
   1.964 +        * GetNextTriggerLC() repeatedly to retrieve all interested trigger 
   1.965 +        * objects. Note, client applications can only get triggers owned by
   1.966 +        * itself.
   1.967 +        *
   1.968 +        * If any trigger is changed during iteration, the client application
   1.969 +        * shall call this method again to reset the iterator and get the 
   1.970 +        * triggers again incrementally.
   1.971 +        *
   1.972 +        * This method requires @p Location capability. 
   1.973 +        *
   1.974 +        * @see CLbtListTriggerOptions
   1.975 +        *
   1.976 +        * @panic LocTriggering  ELbtServerBadHandle If the subsession is not opened.
   1.977 +        *
   1.978 +        * @param[out] aStatus Contains the error code when the 
   1.979 +        * request is completed. KErrNotSupported is returned if there is an area 
   1.980 +        * filter used and the area is not a type of geographical circular or 
   1.981 +        * rectangular area.
   1.982 +        * @param[in] aListOptions Specifies the options used for listing 
   1.983 +        * triggers. Default value is NULL, which will retrieve all triggers
   1.984 +        * owned by the client application. 
   1.985 +        */
   1.986 +        IMPORT_C void CreateGetTriggerIterator( 
   1.987 +            TRequestStatus& aStatus,
   1.988 +            CLbtListTriggerOptions* aListOptions = NULL );
   1.989 +        
   1.990 +       /**
   1.991 +        * Cancel create trigger iterator operation.
   1.992 +        *
   1.993 +        * This function does not require any capabilities. 
   1.994 +        *
   1.995 +        * @see CreateGetTriggerIterator
   1.996 +        */
   1.997 +        IMPORT_C void CancelCreateTriggerIterator();     
   1.998 +
   1.999 +       /**
  1.1000 +        * Gets trigger objects incrementally.
  1.1001 +        * 
  1.1002 +        * This method is used together with CreateGetTriggerIteratorL() to 
  1.1003 +        * incrementally retrieve trigger objects owned by the client 
  1.1004 +        * application. If the iterator is not created when this function is
  1.1005 +        * called, client application gets a panic with code 
  1.1006 +        * @p ELbtIteratorNotCreated.
  1.1007 +        * 
  1.1008 +        * This method returns NULL when all triggers are retrieved. Client
  1.1009 +        * application shall call CreateGetTriggerIteratorL() again to
  1.1010 +        * reset the iterator.
  1.1011 +        * 
  1.1012 +        * Client application takes ownership of the returned trigger object. 
  1.1013 +        * The returned trigger object is left in cleanup stack when the trigger 
  1.1014 +        * object is successfully retrieved.
  1.1015 +        *
  1.1016 +        * This method requires @p Location capability. 
  1.1017 +        *
  1.1018 +        * @panic LocTriggering ELbtServerBadHandle If the subsession is not opened.
  1.1019 +        * @panic LocTriggering ELbtIteratorNotCreated If the iterator has not been created.
  1.1020 +        *
  1.1021 +        * @return The retrieved trigger object. Ownership of the returned 
  1.1022 +        * object is transferred to the client application. 
  1.1023 +        * Returns NULL if all triggers have been retrieved.
  1.1024 +        * @leave Other standard Symbian error code, such as KErrNoMemory,
  1.1025 +        * KErrServerBusy, KErrGeneral, etc.
  1.1026 +        */
  1.1027 +        IMPORT_C CLbtTriggerInfo* GetNextTriggerLC();
  1.1028 +
  1.1029 +       /**
  1.1030 +        * Listens for change events of the triggers owned by the client 
  1.1031 +        * application.
  1.1032 +        *
  1.1033 +        * This method is used by the client application to get change events
  1.1034 +        * when one or many of its triggers are changed.
  1.1035 +        *
  1.1036 +        * Triggers can be deleted and modified not only by the owner process and
  1.1037 +        * trigger handling process, but also by other system application, 
  1.1038 +        * e.g. system management UI application. 
  1.1039 +        *
  1.1040 +        * This function is asynchronous and it will complete the request status
  1.1041 +        * when an event occurs. Client applications can get detailed information of
  1.1042 +        * the change from the retrieved event object. Client application shall
  1.1043 +        * call this function again to get further change event.
  1.1044 +        *
  1.1045 +        * Event listening can be cancelled by calling
  1.1046 +        * CancelNotifyTriggerChangeEvent().
  1.1047 +        *
  1.1048 +        * This method requires @p Location capability. 
  1.1049 +        *
  1.1050 +        * @panic LocTriggering ELbtServerBadHandle If the subsession is not opened.
  1.1051 +        * @panic LocTriggering ELbtDuplicateRequest If the subsession has
  1.1052 +        * already an outstanding NotifyTriggerChangeEvent() request.
  1.1053 +        *
  1.1054 +        * @param[out] aEvent Will contain the event information when an event
  1.1055 +        * occurs.
  1.1056 +        * @param[out] aStatus Will be completed with @p KErrNone if an event occurs
  1.1057 +        *   and an error code(for example, KErrServerBusy, etc.) if some error 
  1.1058 +        *   was encountered.
  1.1059 +        */
  1.1060 +        IMPORT_C void NotifyTriggerChangeEvent( 
  1.1061 +            TLbtTriggerChangeEvent& aEvent, 
  1.1062 +            TRequestStatus& aStatus );
  1.1063 +
  1.1064 +       /**
  1.1065 +        * Cancels listening for trigger change event.
  1.1066 +        * 
  1.1067 +        * This function does not require any capabilities. 
  1.1068 +        *
  1.1069 +        * @see NotifyTriggerChangeEvent
  1.1070 +        */
  1.1071 +        IMPORT_C void CancelNotifyTriggerChangeEvent();
  1.1072 +
  1.1073 +       /**
  1.1074 +        * Listens for the event if any trigger is fired. 
  1.1075 +        *
  1.1076 +        * Client applications can use this method to get notified 
  1.1077 +        * when a trigger (session triggers and start-up triggers) is 
  1.1078 +        * fired. The firing information is 
  1.1079 +        * returned to the client application. If more that one  
  1.1080 +        * trigger is fired, Location Triggers Server will complete 
  1.1081 +        * the request and  the first fired trigger is returned. 
  1.1082 +        * Client application shall call this method again to get next 
  1.1083 +        * trigger firing event. 
  1.1084 +        *
  1.1085 +        * When a start-up trigger is fired, Location Triggering
  1.1086 +        * Server will first launch the specified trigger
  1.1087 +        * handling process, and then notify the client application
  1.1088 +        * about the firing event.
  1.1089 +        *
  1.1090 +        * A client application will get firing event of 
  1.1091 +        * - triggers that are created by itself(Client application is
  1.1092 +        * the owner process of the trigger).
  1.1093 +        * - triggers that trigger handling process SID is set and
  1.1094 +        * matches SID of the client application's process(Client 
  1.1095 +        * application is the triggering handling process of the 
  1.1096 +        * trigger, and it can access the trigger). 
  1.1097 +        *
  1.1098 +        * The request is canceled by CancelNotifyTriggerFired()
  1.1099 +        *
  1.1100 +        * This method requires @p Location capability. 
  1.1101 +        *
  1.1102 +        * @panic LocTriggering ELbtServerBadHandle If the subsession is not opened.
  1.1103 +        * @panic LocTriggering ELbtDuplicateRequest If the subsession has
  1.1104 +        * already an outstanding NotifyTriggerFired() request.
  1.1105 +        *
  1.1106 +        * @param[out] aFireInfo On return contains the fired  
  1.1107 +        * trigger's firing information.
  1.1108 +        * @param[out] aStatus Will be completed with @p KErrNone if an event
  1.1109 +        * occurs, and an error code( for example KErrServerBusy, etc.) if some 
  1.1110 +        * error encountered.
  1.1111 +        */
  1.1112 +        IMPORT_C void NotifyTriggerFired( 
  1.1113 +            TLbtTriggerFireInfo& aFireInfo, 
  1.1114 +            TRequestStatus& aStatus );
  1.1115 +
  1.1116 +       /**
  1.1117 +        * Cancels listening for the trigger fired event.
  1.1118 +        *
  1.1119 +        * This function does not require any capabilities. 
  1.1120 +        *
  1.1121 +        * @see NotifyTriggerFired
  1.1122 +        */
  1.1123 +        IMPORT_C void CancelNotifyTriggerFired();
  1.1124 +
  1.1125 +       /**
  1.1126 +        * Gets fired trigger's information. 
  1.1127 +        * 
  1.1128 +        * This method is used by the client application to get information 
  1.1129 +        * of all the fired triggers( session triggers and start-up triggers). 
  1.1130 +        * If the same trigger is 
  1.1131 +        * fired more than once before the client application retrieves 
  1.1132 +        * the firing information, only the most recent fired
  1.1133 +        * information is returned. If no trigger has been fired, 
  1.1134 +        * an empty list is returned.
  1.1135 +        *
  1.1136 +        * This method requires @p Location capability. 
  1.1137 +        *
  1.1138 +        * @panic LocTriggering ELbtServerBadHandle If the subsession is not opened.
  1.1139 +        *
  1.1140 +        * @param[out] aTriggerInfoList On return contains fired triggers'
  1.1141 +        * information.
  1.1142 +        * @leave Other standard Symbian error code, such as KErrNoMemory,
  1.1143 +        * KErrServerBusy, KErrGeneral, etc.
  1.1144 +        */
  1.1145 +        IMPORT_C void GetFiredTriggersL( 
  1.1146 +            RArray < TLbtTriggerFireInfo >& aTriggerInfoList );
  1.1147 +
  1.1148 +       /**
  1.1149 +        * Listens for the change event of triggering system settings.
  1.1150 +        *
  1.1151 +        * This function is asynchronous and it will complete the 
  1.1152 +        * request status when triggering system settings are changed.
  1.1153 +        * Client applications can get detailed information of triggering 
  1.1154 +        * system setting from method GetTriggeringSystemSettingL(). 
  1.1155 +        * Client application shall call this function again to get 
  1.1156 +        * further change event.
  1.1157 +        *
  1.1158 +        * Event listening can be cancelled by calling
  1.1159 +        * CancelNotifyTriggeringSystemSettingChange().
  1.1160 +        *
  1.1161 +        * This function requires @p ReadUserData capability. 
  1.1162 +        *
  1.1163 +        * @panic LocTriggering ELbtServerBadHandle If the subsession is not opened.
  1.1164 +        * @panic LocTriggering ELbtDuplicateRequest If the subsession has
  1.1165 +        * already an outstanding NotifyTriggeringSystemSettingChange() 
  1.1166 +        * request.
  1.1167 +        *
  1.1168 +        * @param[out] aSettings On return contains the new triggering
  1.1169 +        * system settings.
  1.1170 +        * @param[out] aStatus Will be completed with @p KErrNone if an 
  1.1171 +        * event occurs and an error code( for example, KErrServerBusy, etc.) if 
  1.1172 +        * some error was encountered. 
  1.1173 +        * aStatus will be completed with KErrPermissionDenied if the client 
  1.1174 +        * application does not have enough capability.
  1.1175 +        */
  1.1176 +        IMPORT_C void NotifyTriggeringSystemSettingChange( 
  1.1177 +            TLbtTriggeringSystemSettings& aSettings,
  1.1178 +            TRequestStatus& aStatus );
  1.1179 +        
  1.1180 +       /**
  1.1181 +        * Cancels listening for triggering system setting change event.
  1.1182 +        *
  1.1183 +        * @see NotifyTriggeringSystemSettingChange
  1.1184 +        */
  1.1185 +        IMPORT_C void CancelNotifyTriggeringSystemSettingChange();
  1.1186 +    
  1.1187 +       /**
  1.1188 +        * Gets triggering system setting.
  1.1189 +        *
  1.1190 +        * This method is used by the client application to get triggering
  1.1191 +        * system settings. Client applications can use
  1.1192 +        * NotifyTriggeringSystemSettingChange()
  1.1193 +        * get the change event of the triggering system settings.
  1.1194 +        *
  1.1195 +        * This function requires @p ReadUserData capability. 
  1.1196 +        *
  1.1197 +        * @since S60 5.1
  1.1198 +        *
  1.1199 +        * @panic LocTriggering ELbtServerBadHandle If the subsession is not opened.
  1.1200 +        *
  1.1201 +        * @param[out] aSetting On return contains triggering system 
  1.1202 +        * settings.
  1.1203 +        * @leave KErrPermissionDenied if the client application does not 
  1.1204 +        * have enough capabilities to retrieve the settings.
  1.1205 +        */
  1.1206 +        IMPORT_C void GetTriggeringSystemSettingsL( 
  1.1207 +            TLbtTriggeringSystemSettings& aSetting );
  1.1208 +        
  1.1209 +       /**
  1.1210 +        * Cancels all asynchronous operation that has been issued from 
  1.1211 +        * this subsession.
  1.1212 +        */    
  1.1213 +        IMPORT_C void CancelAll();     
  1.1214 +        
  1.1215 +       /**
  1.1216 +        * Default constructor.
  1.1217 +        */
  1.1218 +        IMPORT_C RLbt();
  1.1219 +        
  1.1220 +       /**
  1.1221 +        * Destructor.
  1.1222 +        */
  1.1223 +        IMPORT_C ~RLbt();
  1.1224 +    
  1.1225 +    private:
  1.1226 +       /**
  1.1227 +        * Helper method for create trigger operation.
  1.1228 +        */
  1.1229 +        void CreateTriggerL( 
  1.1230 +            const CLbtTriggerEntry& aTrigger,
  1.1231 +            TLbtTriggerId& aTriggerId,
  1.1232 +            TBool aFireOnCreation,
  1.1233 +            TRequestStatus& aStatus );
  1.1234 +       /**
  1.1235 +        * Helper method for delete triggers operation.
  1.1236 +        */    
  1.1237 +        void DeleteTriggersL( 
  1.1238 +            CLbtTriggerFilterBase* aFilter,
  1.1239 +            TRequestStatus& aStatus );
  1.1240 +       /**
  1.1241 +        * Helper method for delete triggers operation.
  1.1242 +        */     
  1.1243 +        void DeleteTriggersL( 
  1.1244 +            const RArray<TLbtTriggerId>& aTriggerIdList,
  1.1245 +            TRequestStatus& aStatus );
  1.1246 +        
  1.1247 +        /**
  1.1248 +         * Helper method for update trigger operation.
  1.1249 +         */ 
  1.1250 +        void UpdateTriggerL( 
  1.1251 +                    const CLbtTriggerEntry& aTrigger,
  1.1252 +                    TLbtTriggerAttributeFieldsMask aFieldMask,
  1.1253 +                    TLbtFireOnUpdate aFireOnUpdate,
  1.1254 +                    TRequestStatus& aStatus ); 
  1.1255 +       /**
  1.1256 +        * Helper method for set triggers state operation.
  1.1257 +        */    
  1.1258 +        void SetTriggersStateL( 
  1.1259 +            CLbtTriggerEntry::TLbtTriggerState aState,
  1.1260 +            CLbtTriggerFilterBase* aFilter,
  1.1261 +            TLbtFireOnUpdate aFireOnUpdate,
  1.1262 +            TRequestStatus& aStatus );
  1.1263 +       /**
  1.1264 +        * Helper method for list trigger ids operation.
  1.1265 +        */      
  1.1266 +        void ListTriggerIdsL( 
  1.1267 +            RArray < TLbtTriggerId >& aTriggerIdList,
  1.1268 +            CLbtListTriggerOptions* aListOptions,
  1.1269 +            TRequestStatus& aStatus );
  1.1270 +        
  1.1271 +       /**
  1.1272 +        * Helper method for get triggers operation.
  1.1273 +        */     
  1.1274 +        void GetTriggersL( 
  1.1275 +            RPointerArray < CLbtTriggerInfo >& aTriggerList,
  1.1276 +            CLbtListTriggerOptions* aListOptions,
  1.1277 +            TRequestStatus& aStatus );
  1.1278 +        
  1.1279 +       /**
  1.1280 +        * Helper method for create trigger iterator operation.
  1.1281 +        */     
  1.1282 +        void CreateGetTriggerIteratorL( 
  1.1283 +            CLbtListTriggerOptions* aListOptions,
  1.1284 +            TRequestStatus& aStatus );                       
  1.1285 +        
  1.1286 +       /**
  1.1287 +        * Helper method for get triggers operation.
  1.1288 +        */ 
  1.1289 +        void GetTriggersInServerL(CBufFlat* aBuf,CLbtListTriggerOptions* aListOptions,TInt& aBufLength );
  1.1290 +        
  1.1291 +       /**
  1.1292 +        * Symbian 2nd phase construction.
  1.1293 +        */
  1.1294 +        void ConstructL();
  1.1295 +         
  1.1296 +    private:// data
  1.1297 +       /**
  1.1298 +        * Subsession pointer holder
  1.1299 +        * Own.
  1.1300 +        */
  1.1301 +        CLbtSubSessnPtrHolder* iPtrHolder;
  1.1302 +        
  1.1303 +       /**
  1.1304 +        * Pointer to client requestor.  
  1.1305 +        * Own.
  1.1306 +        */
  1.1307 +        CLbtClientRequester* iClientRequester; 
  1.1308 +        
  1.1309 +       /**
  1.1310 +        * Trigger entry state.
  1.1311 +        */
  1.1312 +        CLbtTriggerEntry::TLbtTriggerState iState;
  1.1313 +        
  1.1314 +       /**
  1.1315 +        * Pointer to TLbtTriggerCreationInfo object.
  1.1316 +        * Own.
  1.1317 +        */
  1.1318 +        TLbtTriggerCreationInfo* iTriggerCreationInfo;
  1.1319 +       
  1.1320 +       
  1.1321 +       /**
  1.1322 +        * Pointer to TLbtTriggerCreationInfo object.
  1.1323 +        * Own.
  1.1324 +        */
  1.1325 +        TLbtTriggerUpdationInfo* iTriggerUpdationInfo; 
  1.1326 +       
  1.1327 +        /**
  1.1328 +        * Pointer to TLbtTriggerStateInfo object.
  1.1329 +        * Own.
  1.1330 +        */
  1.1331 +        TLbtTriggerStateInfo* iTriggerStateInfo;  
  1.1332 +        
  1.1333 +       /**
  1.1334 +        * CLbtTriggerInfo pointer array.
  1.1335 +        */
  1.1336 +        RPointerArray<CLbtTriggerInfo> iTriggerList;
  1.1337 +		
  1.1338 +	   /**
  1.1339 +		* Iterator flag.
  1.1340 +		*/
  1.1341 +		TBool iCreateIteratorFlag;        
  1.1342 +    };
  1.1343 +
  1.1344 +
  1.1345 +#endif // LBT_H