class RLbtManager : public RLbt |
This class provides interface to manage Location Triggering service.
RLbtManager is derived from RLbt . The Open method of RLbt is overwritten in RLbtManager . RLbtManager::Open() will open a subsession to Location Triggering Server. The subession can be used to manage triggering service. Further function calls of RLbtManager through the management subsession may behave differently than those defined in the base class RLbt .
When the subsession is opened with RLbtManager::Open() , the methods derived from RLbt apply to all triggers in the system. Client application can list, modify and delete any trigger in the system even they are not owned by the client application. ReadDeviceData capability is required to list triggers. WriteDeviceData capability is required to update or delete triggers requires.
The following methods defined in RLbt operate on all triggers in the system when the subsession is opened with RLbtManager::Open() .
Client application of this API can only change trigger state attribute if the trigger is not owned by the client application.
When the subsession is opened with RLbtManager::Open() , client application can pass a TLbtTriggeringSystemManagementSettings type of variable as output parameter to GetTriggeringSystemSettingL() to get triggering management system settings. Function NotifyTriggeringSystemSettingChange() is used to get change event of any setting in triggering system management settings is changed.
Following code shows how to get triggering system management settings.
//Connect to Location Triggering Server and open //a subsession with RLbtManager::Open TLbtTriggeringSystemManagementSettings settings; lbtManager.GetTriggeringSystemSettingL(settings);
The following methods behave the same way as defined in RLbt even if the subsession is opened with RLbtManager::Open()
GetFiredStartupTriggersL().
RLbtManager provides methods to set triggering system management settings and to get and monitor triggering system status.
Client application needs read or write device data capabilities to use services provided by this interface.
Before using any of these services, a connection to Location Triggering Server must first be made.
Public Member Functions | |
---|---|
RLbtManager () | |
~RLbtManager () | |
IMPORT_C void | CancelNotifyTriggeringSystemStatusChange () |
IMPORT_C void | GetTriggerManagerUiInfoL ( RArray < TLbtTriggerManagerUiInfo > &) |
IMPORT_C void | GetTriggeringSystemSettingsL ( TLbtTriggeringSystemSettings &) |
IMPORT_C void | GetTriggeringSystemStatusL ( TLbtTriggeringSystemStatus &) |
IMPORT_C void | NotifyTriggeringSystemSettingChange ( TLbtTriggeringSystemManagementSettings &, TRequestStatus &) |
IMPORT_C void | NotifyTriggeringSystemStatusChange ( TRequestStatus &) |
IMPORT_C TInt | Open ( RLbtServer &) |
IMPORT_C void | SetTriggeringMechanismStateL ( TLbtTriggeringMechanismState ) |
IMPORT_C void | SetTriggeringSystemSettingsL (const TLbtTriggeringSystemManagementSettings &, TLbtManagementSettingsMask ) |
Private Attributes | |
---|---|
TLbtManagementSettingsMask | iMask |
CLbtSubSessnPtrHolder * | iPtrHolder |
IMPORT_C void | CancelNotifyTriggeringSystemStatusChange | ( | ) |
Cancels notification request of system triggering status change event.
This function does not require any capabilities.
IMPORT_C void | GetTriggerManagerUiInfoL | ( | RArray < TLbtTriggerManagerUiInfo > & | aManagerUiList | ) |
List all manager UIs that has triggers associated with.
RArray < TLbtTriggerManagerUiInfo > & aManagerUiList | On returns, contains information of manager UIs that has triggers associated with. The information includes the UID of manager UIs, number of enabled, disabled, and invalid triggers etc. |
IMPORT_C void | GetTriggeringSystemSettingsL | ( | TLbtTriggeringSystemSettings & | aSetting | ) |
Gets triggering system setting.
This method is used by the management application to get triggering system settings.
This function requires ReadUserData capability.
TLbtTriggeringSystemSettings & aSetting | reference to TLbtTriggeringSystemManagementSettings object which is derived from TLbtTriggeringSystemSettings and on return contains triggering system settings. |
IMPORT_C void | GetTriggeringSystemStatusL | ( | TLbtTriggeringSystemStatus & | aTriggeringSystemStatus | ) |
Gets triggering status.
This function requires ReadDeviceData capability.
TLbtTriggeringSystemStatus & aTriggeringSystemStatus | On return, contains the system triggering status. |
IMPORT_C void | NotifyTriggeringSystemSettingChange | ( | TLbtTriggeringSystemManagementSettings & | aManagementSettings, |
TRequestStatus & | aStatus | |||
) |
Listens for the change event of triggering system settings.
This function is asynchronous and it will complete the request status when triggering system settings are changed. Client applications can get detailed information of triggering system setting from method GetTriggeringSystemSettingL(). Client application shall call this function again to get further change event.
Event listening can be cancelled by calling CancelNotifyTriggeringSystemSettingChange() .
This function requires ReadUserData capability.
TLbtTriggeringSystemManagementSettings & aManagementSettings | On return contains the new triggering system management settings. |
TRequestStatus & aStatus | Will be completed with KErrNone if an event occurs and an error code( for example, KErrServerBusy, etc.) if some error was encountered. aStatus will be completed with KErrPermissionDenied if the client application does not have enough capability. |
IMPORT_C void | NotifyTriggeringSystemStatusChange | ( | TRequestStatus & | aStatus | ) |
Requests triggering status change event.
This function is asynchronous and it will complete the request status when system triggering status is changed. Client application can get new triggering status from method GetTriggeringSystemStatusL() . Client application shall call this function again to get further change event.
Event listening can be cancelled by calling CancelNotifyTriggeringSystemStatusChange() .
This function requires ReadDeviceData capability.
TRequestStatus & aStatus | Will be completed with KErrNone if an event occurs. aStatus will be completed with KErrPermissionDenied if client application does not have enough capability. |
IMPORT_C TInt | Open | ( | RLbtServer & | aServer | ) |
Opens a subsession with Location Triggering Server.
This method overwrites the Open method in RLbt . It opens a subsession to manage location triggering service. A subsession must be opened before the management service can be used.
RLbtServer & aServer | Reference to the Location Triggering Server session. |
IMPORT_C void | SetTriggeringMechanismStateL | ( | TLbtTriggeringMechanismState | aState | ) |
Sets triggering mechanism state on or off.
When the triggering mechanism state is switched off, no trigger in the system will be supervised. Location Triggering Server will release resources used for triggering supervision and will not make new location request.
This function requires WriteDeviceData capability.
TLbtTriggeringMechanismState aState | The new state of triggering mechanism state. |
IMPORT_C void | SetTriggeringSystemSettingsL | ( | const TLbtTriggeringSystemManagementSettings & | aSettings, |
TLbtManagementSettingsMask | aMask | |||
) |
Sets triggering system management settings.
This method is used by client application to set triggering system management settings. If the following value is used, the corresponding setting will be reset to the system default value.
minimum trigger area size is set to zero
minimum location update interval is set to zero
minimum location update interval when GPS fails is set to zero
maximum user speed is set to zero
the used positioning technology is set to KNullUid
This function requires WriteDeviceData capability.
const TLbtTriggeringSystemManagementSettings & aSettings | The triggering system management settings to be set in Location Triggering Server. |
TLbtManagementSettingsMask aMask |
CLbtSubSessnPtrHolder * | iPtrHolder | [private] |
Subsession pointer holder Own.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.