RLbtManager Class Reference

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()

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.

RLbtlbtmanager.lib
Since
S60 5.1

Inherits from

Public Member Functions
RLbtManager()
~RLbtManager()
IMPORT_C voidCancelNotifyTriggeringSystemStatusChange()
IMPORT_C voidGetTriggerManagerUiInfoL(RArray< TLbtTriggerManagerUiInfo > &)
IMPORT_C voidGetTriggeringSystemSettingsL(TLbtTriggeringSystemSettings &)
IMPORT_C voidGetTriggeringSystemStatusL(TLbtTriggeringSystemStatus &)
IMPORT_C voidNotifyTriggeringSystemSettingChange(TLbtTriggeringSystemManagementSettings &, TRequestStatus &)
IMPORT_C voidNotifyTriggeringSystemStatusChange(TRequestStatus &)
IMPORT_C TIntOpen(RLbtServer &)
IMPORT_C voidSetTriggeringMechanismStateL(TLbtTriggeringMechanismState)
IMPORT_C voidSetTriggeringSystemSettingsL(const TLbtTriggeringSystemManagementSettings &, TLbtManagementSettingsMask)
Inherited Functions
RLbt::CancelAll()
RLbt::CancelCreateTrigger()
RLbt::CancelCreateTriggerIterator()
RLbt::CancelDeleteTriggers()
RLbt::CancelGetTriggers()
RLbt::CancelListTriggerIds()
RLbt::CancelNotifyTriggerChangeEvent()
RLbt::CancelNotifyTriggerFired()
RLbt::CancelNotifyTriggeringSystemSettingChange()
RLbt::CancelSetTriggersState()
RLbt::CancelUpdateTrigger()
RLbt::Close()
RLbt::CreateGetTriggerIterator(TRequestStatus &,CLbtListTriggerOptions *)
RLbt::CreateGetTriggerIteratorL(CLbtListTriggerOptions *)
RLbt::CreateTrigger(const CLbtTriggerEntry &,TLbtTriggerId &,TBool,TRequestStatus &)
RLbt::DeleteTriggerL(TLbtTriggerId)
RLbt::DeleteTriggers(TRequestStatus &,CLbtTriggerFilterBase *)
RLbt::DeleteTriggers(const RArray< TLbtTriggerId > &,TRequestStatus &)
RLbt::DeleteTriggersL(CLbtTriggerFilterBase *)
RLbt::DeleteTriggersL(const RArray< TLbtTriggerId > &)
RLbt::GetFiredTriggersL(RArray< TLbtTriggerFireInfo > &)
RLbt::GetNextTriggerLC()
RLbt::GetTriggerLC(TLbtTriggerId,TLbtTriggerAttributeFieldsMask,TLbtTriggerDynamicInfoFieldsMask)
RLbt::GetTriggers(TRequestStatus &,RPointerArray< CLbtTriggerInfo > &,CLbtListTriggerOptions *)
RLbt::GetTriggersL(RPointerArray< CLbtTriggerInfo > &,CLbtListTriggerOptions *)
RLbt::HandleGetTriggersL()
RLbt::HandleListTriggerIdsL()
RLbt::ListTriggerIds(TRequestStatus &,RArray< TLbtTriggerId > &,CLbtListTriggerOptions *)
RLbt::ListTriggerIdsL(RArray< TLbtTriggerId > &,CLbtListTriggerOptions *)
RLbt::NotifyTriggerChangeEvent(TLbtTriggerChangeEvent &,TRequestStatus &)
RLbt::NotifyTriggerFired(TLbtTriggerFireInfo &,TRequestStatus &)
RLbt::NotifyTriggeringSystemSettingChange(TLbtTriggeringSystemSettings &,TRequestStatus &)
RLbt::Open()
RLbt::RLbt()
RLbt::SetTriggerStateL(TLbtTriggerId,CLbtTriggerEntry::TLbtTriggerState,TLbtFireOnUpdate)
RLbt::SetTriggersState(TRequestStatus &,CLbtTriggerEntry::TLbtTriggerState,TLbtFireOnUpdate,CLbtTriggerFilterBase *)
RLbt::SetTriggersStateL(CLbtTriggerEntry::TLbtTriggerState,TLbtFireOnUpdate,CLbtTriggerFilterBase *)
RLbt::UpdateTrigger(const CLbtTriggerEntry &,TLbtTriggerAttributeFieldsMask,TLbtFireOnUpdate,TRequestStatus &)
RLbt::UpdateTriggerL(const CLbtTriggerEntry &,TLbtTriggerAttributeFieldsMask,TLbtFireOnUpdate)
RLbt::~RLbt()
RSubSessionBase::CloseSubSession(TInt)
RSubSessionBase::CreateAutoCloseSubSession(RSessionBase &,TInt,const TIpcArgs &)
RSubSessionBase::CreateSubSession(const RSessionBase &,TInt)
RSubSessionBase::CreateSubSession(const RSessionBase &,TInt,const TIpcArgs &)
RSubSessionBase::RSubSessionBase()
RSubSessionBase::Send(TInt)const
RSubSessionBase::Send(TInt,const TIpcArgs &)const
RSubSessionBase::SendReceive(TInt)const
RSubSessionBase::SendReceive(TInt,TRequestStatus &)const
RSubSessionBase::SendReceive(TInt,const TIpcArgs &)const
RSubSessionBase::SendReceive(TInt,const TIpcArgs &,TRequestStatus &)const
RSubSessionBase::Session()const
RSubSessionBase::SubSessionHandle()const
Private Attributes
TLbtManagementSettingsMask iMask
CLbtSubSessnPtrHolder *iPtrHolder

Constructor & Destructor Documentation

RLbtManager()

IMPORT_CRLbtManager()

Default constructor

~RLbtManager()

IMPORT_C~RLbtManager()

Destructor

Member Functions Documentation

CancelNotifyTriggeringSystemStatusChange()

IMPORT_C voidCancelNotifyTriggeringSystemStatusChange()

Cancels notification request of system triggering status change event.

This function does not require any capabilities.

NotifyTriggeringSystemStatusChange

GetTriggerManagerUiInfoL(RArray< TLbtTriggerManagerUiInfo > &)

IMPORT_C voidGetTriggerManagerUiInfoL(RArray< TLbtTriggerManagerUiInfo > &aManagerUiList)

List all manager UIs that has triggers associated with.

Parameters

RArray< TLbtTriggerManagerUiInfo > & aManagerUiListOn 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.

GetTriggeringSystemSettingsL(TLbtTriggeringSystemSettings &)

IMPORT_C voidGetTriggeringSystemSettingsL(TLbtTriggeringSystemSettings &aSetting)

Gets triggering system setting.

This method is used by the management application to get triggering system settings.

This function requires ReadUserData capability.

panic
LocTriggering ELbtServerBadHandle If the subsession is not opened.
leave
KErrPermissionDenied if the client application does not have enough capabilities to retrieve the settings.

Parameters

TLbtTriggeringSystemSettings & aSettingreference to TLbtTriggeringSystemManagementSettings object which is derived from TLbtTriggeringSystemSettings and on return contains triggering system settings.

GetTriggeringSystemStatusL(TLbtTriggeringSystemStatus &)

IMPORT_C voidGetTriggeringSystemStatusL(TLbtTriggeringSystemStatus &aTriggeringSystemStatus)

Gets triggering status.

This function requires ReadDeviceData capability.

panic
LocTriggering ELbtServerBadHandle If the subsession is not opened.
leave
KErrPermissionDenied if the client application does not have enough capabilities.

Parameters

TLbtTriggeringSystemStatus & aTriggeringSystemStatusOn return, contains the system triggering status.

NotifyTriggeringSystemSettingChange(TLbtTriggeringSystemManagementSettings &, TRequestStatus &)

IMPORT_C voidNotifyTriggeringSystemSettingChange(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.

panic
LocTriggering ELbtServerBadHandle If the subsession is not opened.
panic
LocTriggering ELbtDuplicateRequest If the subsession has already an outstanding NotifyTriggeringSystemSettingChange() request.

Parameters

TLbtTriggeringSystemManagementSettings & aManagementSettingsOn return contains the new triggering system management settings.
TRequestStatus & aStatusWill 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.

NotifyTriggeringSystemStatusChange(TRequestStatus &)

IMPORT_C voidNotifyTriggeringSystemStatusChange(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.

panic
LocTriggering ELbtServerBadHandle If the subsession is not opened.
panic
LocTriggering ELbtDuplicateRequest If the client application has already an outstanding NotifyTriggeringSystemStatusChange() request.

Parameters

TRequestStatus & aStatusWill be completed with KErrNone if an event occurs. aStatus will be completed with KErrPermissionDenied if client application does not have enough capability.

Open(RLbtServer &)

IMPORT_C TIntOpen(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.

panic
LocTriggering ELbtServerBadHandle If a session to Location Triggering Server has not been connected.

Parameters

RLbtServer & aServerReference to the Location Triggering Server session.

SetTriggeringMechanismStateL(TLbtTriggeringMechanismState)

IMPORT_C voidSetTriggeringMechanismStateL(TLbtTriggeringMechanismStateaState)

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.

panic
LocTriggering ELbtServerBadHandle If the subsession is not opened.
leave
KErrPermissionDenied if the client application does not have enough capabilities.

Parameters

TLbtTriggeringMechanismState aStateThe new state of triggering mechanism state.

SetTriggeringSystemSettingsL(const TLbtTriggeringSystemManagementSettings &, TLbtManagementSettingsMask)

IMPORT_C voidSetTriggeringSystemSettingsL(const TLbtTriggeringSystemManagementSettings &aSettings,
TLbtManagementSettingsMaskaMask
)

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.

panic
LocTriggering ELbtServerBadHandle If the subsession is not opened.
leave
KErrPermissionDenied if the client application does not have enough capabilities.

Parameters

const TLbtTriggeringSystemManagementSettings & aSettingsThe triggering system management settings to be set in Location Triggering Server.
TLbtManagementSettingsMask aMask

Member Data Documentation

TLbtManagementSettingsMask iMask

TLbtManagementSettingsMask iMask[private]

Management setting mask

CLbtSubSessnPtrHolder * iPtrHolder

CLbtSubSessnPtrHolder *iPtrHolder[private]

Subsession pointer holder Own.