RLbt Class Reference

#include <mw/lbt.h>

Link against: lbt.lib

class RLbt : public RSubSessionBase

Inherits from

  • RLbt
    Public Member Functions
    RLbt()
    ~RLbt()
    IMPORT_C voidCancelAll()
    IMPORT_C voidCancelCreateTrigger()
    IMPORT_C voidCancelCreateTriggerIterator()
    IMPORT_C voidCancelDeleteTriggers()
    IMPORT_C voidCancelGetTriggers()
    IMPORT_C voidCancelListTriggerIds()
    IMPORT_C voidCancelNotifyTriggerChangeEvent()
    IMPORT_C voidCancelNotifyTriggerFired()
    IMPORT_C voidCancelNotifyTriggeringSystemSettingChange()
    IMPORT_C voidCancelSetTriggersState()
    IMPORT_C voidCancelUpdateTrigger()
    IMPORT_C voidClose()
    IMPORT_C voidCreateGetTriggerIterator(TRequestStatus &, CLbtListTriggerOptions *)
    IMPORT_C voidCreateGetTriggerIteratorL(CLbtListTriggerOptions *)
    IMPORT_C voidCreateTrigger(const CLbtTriggerEntry &, TLbtTriggerId &, TBool, TRequestStatus &)
    IMPORT_C voidDeleteTriggerL(TLbtTriggerId)
    IMPORT_C voidDeleteTriggers(TRequestStatus &, CLbtTriggerFilterBase *)
    IMPORT_C voidDeleteTriggers(const RArray< TLbtTriggerId > &, TRequestStatus &)
    IMPORT_C voidDeleteTriggersL(CLbtTriggerFilterBase *)
    IMPORT_C voidDeleteTriggersL(const RArray< TLbtTriggerId > &)
    IMPORT_C voidGetFiredTriggersL(RArray< TLbtTriggerFireInfo > &)
    IMPORT_C CLbtTriggerInfo *GetNextTriggerLC()
    IMPORT_C CLbtTriggerInfo *GetTriggerLC(TLbtTriggerId, TLbtTriggerAttributeFieldsMask, TLbtTriggerDynamicInfoFieldsMask)
    IMPORT_C voidGetTriggeringSystemSettingsL(TLbtTriggeringSystemSettings &)
    IMPORT_C voidGetTriggers(TRequestStatus &, RPointerArray< CLbtTriggerInfo > &, CLbtListTriggerOptions *)
    IMPORT_C voidGetTriggersL(RPointerArray< CLbtTriggerInfo > &, CLbtListTriggerOptions *)
    voidHandleGetTriggersL()
    voidHandleListTriggerIdsL()
    IMPORT_C voidListTriggerIds(TRequestStatus &, RArray< TLbtTriggerId > &, CLbtListTriggerOptions *)
    IMPORT_C voidListTriggerIdsL(RArray< TLbtTriggerId > &, CLbtListTriggerOptions *)
    IMPORT_C voidNotifyTriggerChangeEvent(TLbtTriggerChangeEvent &, TRequestStatus &)
    IMPORT_C voidNotifyTriggerFired(TLbtTriggerFireInfo &, TRequestStatus &)
    IMPORT_C voidNotifyTriggeringSystemSettingChange(TLbtTriggeringSystemSettings &, TRequestStatus &)
    IMPORT_C TIntOpen(RLbtServer &)
    IMPORT_C TIntOpen()
    IMPORT_C voidSetTriggerStateL(TLbtTriggerId, CLbtTriggerEntry::TLbtTriggerState, TLbtFireOnUpdate)
    IMPORT_C voidSetTriggersState(TRequestStatus &, CLbtTriggerEntry::TLbtTriggerState, TLbtFireOnUpdate, CLbtTriggerFilterBase *)
    IMPORT_C voidSetTriggersStateL(CLbtTriggerEntry::TLbtTriggerState, TLbtFireOnUpdate, CLbtTriggerFilterBase *)
    IMPORT_C voidUpdateTrigger(const CLbtTriggerEntry &, TLbtTriggerAttributeFieldsMask, TLbtFireOnUpdate, TRequestStatus &)
    IMPORT_C voidUpdateTriggerL(const CLbtTriggerEntry &, TLbtTriggerAttributeFieldsMask, TLbtFireOnUpdate)
    Inherited Functions
    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

    Detailed Description

    A handle to Location Triggering Server subsession. This class provides methods to use location triggering service from Location Triggering Server.

    RLbt is used to create subsession with Location Triggering Server for the purpose of using the location triggering service. This class provides mechanisms for creating, listing, modifying and deleting trigger entries in Location Triggering Server. Besides, there are also methods to get trigger change and system settings change events, and session trigger firing event. It also provides method for getting location triggering related system settings.

    Before using any of these services, a connection to Location Triggering Server must first be made.

    A client can have multiple sessions connected to the Location Triggering Server. There can be multiple subsessions opened from one session. Triggers created from one subsession can be accessed from other subsessions within the same process. Trigger change event, trigger firing event and triggering system settings change event are send to all subsessions that have issued notification requests to Location Triggering Server.

    Client must not issue a notification request while there is a same request still outstanding. An attempt to do so will generate a panic with code ELbtDuplicateRequest in category "LocTriggering". This applies to the following functions.

    • NotifyTriggerChangeEvent

    • NotifyTriggerFired

    • NotifyTriggeringSystemSettingChange

    Client may get error code KErrInUse if it tries to read, write or delete a trigger while the previous write or delete operation is not completed yet.

    See also: RLbtServer

    library
    lbt.lib
    Since
    S60 5.1

    Constructor & Destructor Documentation

    RLbt ( )

    IMPORT_CRLbt()

    Default constructor.

    ~RLbt ( )

    IMPORT_C~RLbt()

    Destructor.

    Member Function Documentation

    CancelAll ( )

    IMPORT_C voidCancelAll()

    Cancels all asynchronous operation that has been issued from this subsession.

    CancelCreateTrigger ( )

    IMPORT_C voidCancelCreateTrigger()

    Cancel trigger creation.

    This function does not require any capabilities.

    See also: CreateTriggerL

    CancelCreateTriggerIterator ( )

    IMPORT_C voidCancelCreateTriggerIterator()

    Cancel create trigger iterator operation.

    This function does not require any capabilities.

    See also: CreateGetTriggerIterator

    CancelDeleteTriggers ( )

    IMPORT_C voidCancelDeleteTriggers()

    Cancel delete triggers operation.

    This function does not require any capabilities.

    See also: DeleteTriggers

    CancelGetTriggers ( )

    IMPORT_C voidCancelGetTriggers()

    Cancel get triggers operation.

    This function does not require any capabilities.

    See also: GetTriggers

    CancelListTriggerIds ( )

    IMPORT_C voidCancelListTriggerIds()

    Cancel list trigger ids operation.

    This function does not require any capabilities.

    See also: ListTriggerIds

    CancelNotifyTriggerChangeEvent ( )

    IMPORT_C voidCancelNotifyTriggerChangeEvent()

    Cancels listening for trigger change event.

    This function does not require any capabilities.

    See also: NotifyTriggerChangeEvent

    CancelNotifyTriggerFired ( )

    IMPORT_C voidCancelNotifyTriggerFired()

    Cancels listening for the trigger fired event.

    This function does not require any capabilities.

    See also: NotifyTriggerFired

    CancelNotifyTriggeringSystemSettingChange ( )

    IMPORT_C voidCancelNotifyTriggeringSystemSettingChange()

    Cancels listening for triggering system setting change event.

    See also: NotifyTriggeringSystemSettingChange

    CancelSetTriggersState ( )

    IMPORT_C voidCancelSetTriggersState()

    Cancel set trigger state operation.

    This function does not require any capabilities.

    See also: SetTriggersState

    CancelUpdateTrigger ( )

    IMPORT_C voidCancelUpdateTrigger()

    Cancel update trigger operation.

    This function does not require any capabilities.

    See also: UpdateTrigger

    Close ( )

    IMPORT_C voidClose()

    Closes the subsession with Location Triggering Server.

    Close() must be called when RLbt subsession is no longer required.

    Before a subsession is closed, the client application must ensure that all outstanding notification requests have been cancelled. In particular, the application must issue all the appropriate Cancel requests and then wait for a confirmation that the notification has been terminated. A failure to do so results in a panic.

    When the subsession is closed, all the session triggers owned by the client application are deleted by Location Triggering Server. Start-up triggers are not affected by this method.

    panic
    LocTriggering ELbtRequestsNotCancelled If client application has requests outstanding with Location Triggering Server.

    CreateGetTriggerIterator ( TRequestStatus &, CLbtListTriggerOptions * )

    IMPORT_C voidCreateGetTriggerIterator(TRequestStatus &aStatus,
    CLbtListTriggerOptions *aListOptions = NULL
    )

    Creates an iterator asynchronously in Location Triggering Server to retrieve trigger objects incrementally.

    An iterator must be created before GetNextTriggerLC() can be called. The iterator is constructed in the server side and it is subsession specific. Calling this function again will reset the iterator. After the iterator is constructed, the client application calls GetNextTriggerLC() repeatedly to retrieve all interested trigger objects. Note, client applications can only get triggers owned by itself.

    If any trigger is changed during iteration, the client application shall call this method again to reset the iterator and get the triggers again incrementally.

    This method requires Location capability.

    See also: CLbtListTriggerOptions

    panic
    LocTriggering ELbtServerBadHandle If the subsession is not opened.
    ParameterDescription
    aStatusContains the error code when the request is completed. KErrNotSupported is returned if there is an area filter used and the area is not a type of geographical circular or rectangular area.
    aListOptionsSpecifies the options used for listing triggers. Default value is NULL, which will retrieve all triggers owned by the client application.

    CreateGetTriggerIteratorL ( CLbtListTriggerOptions * )

    IMPORT_C voidCreateGetTriggerIteratorL(CLbtListTriggerOptions *aListOptions = NULL)

    Creates an iterator in Location Triggering Server to retrieve trigger objects incrementally.

    An iterator must be created before GetNextTriggerLC() can be called. The iterator is constructed in the server side and it is subsession specific. Calling this function again will reset the iterator. After the iterator is constructed, the client application calls GetNextTriggerLC() repeatedly to retrieve all interested trigger objects. Note, client applications can only get triggers owned by itself.

    If any trigger is changed during iteration, the client application shall call this method again to reset the iterator and get the triggers again incrementally.

    This method requires Location capability.

    See also: CLbtListTriggerOptions

    panic
    LocTriggering ELbtServerBadHandle If the subsession is not opened.
    leave
    KErrNotSupported If there is an area filter used and the area is not a type of geographical circular or rectangular area.
    leave
    Other standard Symbian error code, such as KErrNoMemory, KErrServerBusy, KErrGeneral, etc.
    ParameterDescription
    aListOptionsSpecifies the options used for listing triggers. Default value is NULL, which will retrieve all triggers owned by the client application.

    CreateTrigger ( const CLbtTriggerEntry &, TLbtTriggerId &, TBool, TRequestStatus & )

    IMPORT_C voidCreateTrigger(const CLbtTriggerEntry &aTrigger,
    TLbtTriggerId &aTriggerId,
    TBoolaFireOnCreation,
    TRequestStatus &aStatus
    )

    Creates a trigger in Location Triggering Server and returns the trigger Id.

    Client application may use this method to create a trigger in Location Triggering Server. When a trigger is created, the process of the client application becomes the owner process of the trigger.

    Trigger entry shall be a subclass of CLbtTriggerEntry.

    Start-up triggers are stored persistently. They can be deleted by method RLbt::DeleteTriggerL(). Session triggers remain until DeleteTriggerL() is called or the client's subsession is closed.

    While creating a trigger, the following attributes are mandatory for any type of trigger,
    • Name

    • Requestors

    • Trigger condition

    In case of start-up trigger, the following attribute is also mandatory
    • Process Identity

    Although manager UI is not a mandatory attribute, it's highly recommended that correct manager UI is specified.

    Currently, the system only supports CLbtTriggerConditionArea to be used as trigger condition. Following attributes must be specified,
    • Trigger area

    • Direction

    Currently, only CLbtGeoCircle can be used as trigger area. The center of the geographical circle must be specified.

    If the radius of the trigger area is not specified, minimum size of trigger area will be used in the created trigger entry.

    The trigger ID attribute is ignored while creating a trigger. If the trigger is successfully created, trigger ID is returned to the client application. If the trigger is enabled, Location Triggering Server will supervise the trigger and fires it when trigger conditions are met.

    Creating any type triggers requires Location capability. WriteUserData capability is required in addition to create start-up triggers.

    See also: CLbtTriggerEntry CLbtSessionTrigger CLbtStartupTrigger CancelCreateTrigger

    panic
    LocTriggering ELbtServerBadHandle If the subsession is not opened.
    ParameterDescription
    aTriggerThe trigger to be created. Trigger Id attribute is ignored by Location Triggering Server.
    aTriggerIdContains trigger ID of the created trigger When the request is completed. Trigger is is unique among all triggers currently exist in the system. If a trigger is removed from the system, its Id may be reused by another trigger.
    aFireOnCreationThe parameter specifies if the trigger can be fired right after the creation.If this parameter is ETrue. For entry type of trigger, if the trigger is created inside the trigger area, it is fired right after it is created. For exit type of trigger, if the trigger is created outside of the trigger area, it is fired right after it is created.If this parameter is EFalse. For entry type of trigger, if the trigger is created inside the trigger area, it will not be fired immediately. The trigger will be fired when the terminal moves outside of the trigger area and then enters the trigger area again. For exit type of trigger, if the trigger is created outside of trigger area it will be fired immediately. The trigger will be fired when the terminal moves into the trigger area and then moves out again.
    aStatusContains the error code when the request is completed.KErrNone. If the trigger is created successfully.KErrArgument. If any of mandatory attributes are not specified, the manager UI is specified but it is not a valid UI application, or the length of the trigger name is zero or larger than KLbtMaxNameLength.KErrNotSupported. If the trigger condition is not an instance of CLbtTriggerConditionBasic, or if the trigger area is not an instance of CLbtGeoCircle. Also returned if the trigger direction is EFireOnExit and the trigger being created is a cell based trigger.KErrAccessDenied. If the requestor attributes are missing, privacy checking by Location Server determines that any of the specified requestors do not have permission to retrieve location information,KErrPermisionDenied. If the client application does not have enough capabilities to create this trigger.KErrTriggeringAreaTooSmall. If the specified trigger area is smaller than minimum size of trigger area.KErrLbtMaxTriggerLimitExceeded. If creating startup trigger exceeds the system defined limit.KErrDiskFull. Disk full when creating a start-up trigger.Other standard Symbian error code, such as KErrNoMemory, KErrServerBusy, KErrGeneral. If the operation fails.

    DeleteTriggerL ( TLbtTriggerId )

    IMPORT_C voidDeleteTriggerL(TLbtTriggerIdaId)

    Deletes a specific trigger from Location Triggering Server.

    Client applications can only delete triggers owned by it.

    Deleting any type triggers requires Location capability. WriteUserData capability is required in addition to delete start-up triggers.

    panic
    LocTriggering ELbtServerBadHandle If the subsession is not opened.
    leave
    KErrNotFound If the specified trigger is not found or it is not owned by the client application.
    leave
    KErrInUse If the previous write or delete operation on the trigger is not completed yet.
    leave
    Other standard Symbian error code, such as KErrNoMemory, KErrServerBusy, KErrGeneral, etc.
    ParameterDescription
    aIdThe ID of the trigger to be deleted.

    DeleteTriggers ( TRequestStatus &, CLbtTriggerFilterBase * )

    IMPORT_C voidDeleteTriggers(TRequestStatus &aStatus,
    CLbtTriggerFilterBase *aFilter = NULL
    )

    Delete triggers asynchronously. Triggers to be deleted must be owned by the client application and fulfill the specified criteria.

    If no trigger that belong to the client application fulfills the specified criteria, the method completes the client request with KErrNotFound.

    If only a part of the triggers that fullfill the criteria belong to the client application, then only those triggers belonging to that client application would be deleted and the method would complete without any error.

    If no filter is specified, all triggers owned by the client application are deleted.

    Deleting any type triggers requires Location capability. WriteUserData capability is required in addition to delete start-up triggers.

    panic
    LocTriggering ELbtServerBadHandle If the subsession is not opened.
    ParameterDescription
    aStatusContains the error code when the request is completed.KErrNone If the operation was successful.KErrNotFound If no trigger belonging to the client application fullfills the criteria specified.Other standard Symbian error code, such as KErrNoMemory, KErrServerBusy, KErrGeneral, etc.
    aFilterSpecify the filter for the delete operation. Trigger entries that fulfill the criteria will be deleted from Location Triggering Server. Default value is NULL in which case all triggers owned by the client applications will be deleted.

    DeleteTriggers ( const RArray< TLbtTriggerId > &, TRequestStatus & )

    IMPORT_C voidDeleteTriggers(const RArray< TLbtTriggerId > &aTriggerIdList,
    TRequestStatus &aStatus
    )

    Delete triggers asynchronously based on a list of trigger Ids. The triggers to be deleted must be owned by the client application.

    If none of the triggers to be deleted are owned by the client application then no triggers would be deleted and this method will complete the request with KErrNotFound.

    If the list is empty, no trigger will be deleted and this method completes without any error code.

    In the case where a list of trigger IDs are mentioned of which only a few of those belong to the client, then only all those triggers that belong to the client will be deleted and the rest ignored. The method will complete without any leave in this case.

    Deleting any type of triggers requires Location capability. WriteUserData capability is required in addition to delete start-up triggers.

    panic
    LocTriggering ELbtServerBadHandle If the subsession is not opened.
    ParameterDescription
    aTriggerIdListThe list contains IDs of the triggers that are to be deleted.
    aStatusContains the error code when the request is completed.KErrNone If the operation was succeed.Other standard Symbian error code, such as KErrNoMemory, KErrServerBusy, KErrGeneral, etc.

    DeleteTriggersL ( CLbtTriggerFilterBase * )

    IMPORT_C voidDeleteTriggersL(CLbtTriggerFilterBase *aFilter = NULL)

    Delete triggers that are owned by the client application and fulfill the specified criteria.

    If none of the triggers that belong to the client application fulfill the specified criteria, the method leaves with KErrNotFound.

    If only a part of the triggers that fullfill the criteria belong to the client application, then only those triggers belonging to that client application would be deleted and the method would complete without any leave.

    If no filter is specified, all triggers owned by the client application are deleted.

    Deleting any type triggers requires Location capability. WriteUserData capability is required in addition to delete start-up triggers.

    panic
    LocTriggering ELbtServerBadHandle If the subsession is not opened.
    leave
    KErrNotSupported If there is an area filter used and the area is not a type of geographical circular or rectangular area.
    leave
    KErrNotFound If no trigger belonging to the client application fullfills the criteria specified.
    leave
    Other standard Symbian error code, such as KErrNoMemory, KErrServerBusy, KErrGeneral, etc.
    ParameterDescription
    aFilterSpecify the filter for the delete operation. Trigger entries that fulfill the criteria will be deleted from Location Triggering Server. By default, no filter is used. In this case, all triggers owned by the client applications will be deleted.

    DeleteTriggersL ( const RArray< TLbtTriggerId > & )

    IMPORT_C voidDeleteTriggersL(const RArray< TLbtTriggerId > &aTriggerIdList)

    Delete triggers based on a list of trigger Ids. The triggers to be deleted must be owned by the client application.

    If none of the triggers to be deleted are owned by the client application then no triggers would be deleted and this method will leave with KErrNotFound.

    If the list is empty, no trigger will be deleted and this method completes without any leave.

    In the case where a list of trigger IDs are mentioned of which only a few of those belong to the client, then only all those triggers that belong to the client will be deleted and the rest ignored. The method will complete without any leave in this case.

    Deleting any type of triggers requires Location capability. WriteUserData capability is required in addition to delete start-up triggers.

    panic
    LocTriggering ELbtServerBadHandle If the subsession is not opened.
    leave
    Other standard Symbian error code, such as KErrNoMemory, KErrServerBusy, KErrGeneral, etc.
    ParameterDescription
    aTriggerIdListThe list contains IDs of the triggers that are to be deleted.

    GetFiredTriggersL ( RArray< TLbtTriggerFireInfo > & )

    IMPORT_C voidGetFiredTriggersL(RArray< TLbtTriggerFireInfo > &aTriggerInfoList)

    Gets fired trigger's information.

    This method is used by the client application to get information of all the fired triggers( session triggers and start-up triggers). If the same trigger is fired more than once before the client application retrieves the firing information, only the most recent fired information is returned. If no trigger has been fired, an empty list is returned.

    This method requires Location capability.

    panic
    LocTriggering ELbtServerBadHandle If the subsession is not opened.
    leave
    Other standard Symbian error code, such as KErrNoMemory, KErrServerBusy, KErrGeneral, etc.
    ParameterDescription
    aTriggerInfoListOn return contains fired triggers' information.

    GetNextTriggerLC ( )

    IMPORT_C CLbtTriggerInfo *GetNextTriggerLC()

    Gets trigger objects incrementally.

    This method is used together with CreateGetTriggerIteratorL() to incrementally retrieve trigger objects owned by the client application. If the iterator is not created when this function is called, client application gets a panic with code ELbtIteratorNotCreated.

    This method returns NULL when all triggers are retrieved. Client application shall call CreateGetTriggerIteratorL() again to reset the iterator.

    Client application takes ownership of the returned trigger object. The returned trigger object is left in cleanup stack when the trigger object is successfully retrieved.

    This method requires Location capability.

    panic
    LocTriggering ELbtServerBadHandle If the subsession is not opened.
    panic
    LocTriggering ELbtIteratorNotCreated If the iterator has not been created.
    leave
    Other standard Symbian error code, such as KErrNoMemory, KErrServerBusy, KErrGeneral, etc.

    Returns: The retrieved trigger object. Ownership of the returned object is transferred to the client application. Returns NULL if all triggers have been retrieved.

    GetTriggerLC ( TLbtTriggerId, TLbtTriggerAttributeFieldsMask, TLbtTriggerDynamicInfoFieldsMask )

    Gets the specified trigger from Location Triggering Server.

    Client application takes the ownership ofthe returned trigger object. The returned trigger object is left in cleanup stack when the trigger entry is successfully retrieved.

    Each trigger entry object consumes about 100 - 200 bytes user heap, if all attributes are filled. To save memory usage, client applications can retrieve trigger object with only partial attributes filled.

    This method requires Location capability.

    panic
    LocTriggering ELbtServerBadHandle If the subsession is not opened.
    leave
    KErrNotFound If the specified trigger is not found or it's not owned by the client application.
    leave
    Other standard Symbian error code, such as KErrNoMemory, KErrServerBusy, KErrGeneral, etc.
    ParameterDescription
    aIdThe ID of the trigger to be retrieved.
    aEntryFieldMaskThe trigger entry's attribute field mask. It specifies what attributes shall be filled in the returned trigger object. The default value is KLbtTriggerAttributeFieldsAll, which means all attributes field will be filled. Wether the trigger ID attribute is specified or not in this mask, the returned trigger object always contains a valid trigger Id.
    aDynInfoFieldMaskSpecifies which dynamic information field shall be filled in the returned object. The default value is KLbtTriggerDynInfoFieldsAll, which means all dynamic information fields will be filled.

    Returns: The retrieved trigger object. Ownership of the object is transferred to the client application.

    GetTriggeringSystemSettingsL ( TLbtTriggeringSystemSettings & )

    IMPORT_C voidGetTriggeringSystemSettingsL(TLbtTriggeringSystemSettings &aSetting)

    Gets triggering system setting.

    This method is used by the client application to get triggering system settings. Client applications can use NotifyTriggeringSystemSettingChange() get the change event of the triggering system settings.

    This function requires ReadUserData capability.

    Since
    S60 5.1
    panic
    LocTriggering ELbtServerBadHandle If the subsession is not opened.
    leave
    KErrPermissionDenied if the client application does not have enough capabilities to retrieve the settings.
    ParameterDescription
    aSettingOn return contains triggering system settings.

    GetTriggers ( TRequestStatus &, RPointerArray< CLbtTriggerInfo > &, CLbtListTriggerOptions * )

    IMPORT_C voidGetTriggers(TRequestStatus &aStatus,
    RPointerArray< CLbtTriggerInfo > &aTriggerList,
    CLbtListTriggerOptions *aListOptions = NULL
    )

    Gets triggers asynchronously from Location Triggering Server. A client application can only retrieve triggers owned by it.

    Client applications can specify options used in retrieving triggers. Ownership of the returned trigger objects is transferred to the client application.

    Note: This function may require large free heap memory from the client application depending on the number of triggers to be retrieved and the attributes to be filled.

    This method requires Location capability.

    See also: CLbtListTriggerOptions

    panic
    LocTriggering ELbtServerBadHandle If the subsession is not opened.
    ParameterDescription
    aStatusContains the error code when the request is completed.KErrNotSupported. If there is an area filter used and the area is not a type of geographical circular or rectangular area.Other standard Symbian error code, such as KErrNoMemory, KErrServerBusy, KErrGeneral, etc.
    aTriggerListOn return, contains trigger objects retrieved from Location Triggering Server. The content of aTriggerList is cleared even if this function fails. The ownership of the returned pointers is transfered to the client application.
    aListOptionsSpecifies the options for listing triggers. By default, the value is NULL. In this case all triggers owned by the client application will be retrieved.

    GetTriggersL ( RPointerArray< CLbtTriggerInfo > &, CLbtListTriggerOptions * )

    IMPORT_C voidGetTriggersL(RPointerArray< CLbtTriggerInfo > &aTriggerList,
    CLbtListTriggerOptions *aListOptions = NULL
    )

    Gets triggers from Location Triggering Server. A client application can only retrieve triggers owned by it.

    Client applications can specify options used in retrieving triggers. Ownership of the returned trigger objects is transferred to the client application.

    Note: This function may require large free heap memory from the client application depending on the number of triggers to be retrieved and the attributes to be filled.

    This method requires Location capability.

    See also: CLbtListTriggerOptions

    panic
    LocTriggering ELbtServerBadHandle If the subsession is not opened.
    leave
    KErrNotSupported If there is an area filter used and the area is not a type of geographical circular or rectangular area.
    leave
    Other standard Symbian error code, such as KErrNoMemory, KErrServerBusy, KErrGeneral, etc.
    ParameterDescription
    aTriggerListOn return, contains trigger objects retrieved from Location Triggering Server. The content of aTriggerList is cleared even if this function fails. The ownership of the returned pointers is transfered to the client application.
    aListOptionsSpecifies the options for listing triggers. By default, the value is NULL. In this case all triggers owned by the client application will be retrieved.

    HandleGetTriggersL ( )

    voidHandleGetTriggersL()

    Handles get triggers operation

    HandleListTriggerIdsL ( )

    voidHandleListTriggerIdsL()

    Handles list triggers operation

    ListTriggerIds ( TRequestStatus &, RArray< TLbtTriggerId > &, CLbtListTriggerOptions * )

    IMPORT_C voidListTriggerIds(TRequestStatus &aStatus,
    RArray< TLbtTriggerId > &aTriggerIdList,
    CLbtListTriggerOptions *aListOptions = NULL
    )

    Lists asynchronously IDs of triggers that are owned by the client application.

    Client applications can specify options used in retrieving trigger IDs.

    This method requires Location capability.

    See also: CLbtListTriggerOptions

    panic
    LocTriggering ELbtServerBadHandle If the subsession is not opened.
    ParameterDescription
    aStatusContains the error code when the request is completed. KErrNotSupported is returned if there is an area filter used and the area is not a type of geographical circular or rectangular area.KErrNotSupported If there is an area filter used and the area is not a type of geographical circular or rectangular area.Other standard Symbian error code, such as KErrNoMemory, KErrServerBusy, KErrGeneral, etc.
    aTriggerIdListOn return, aTriggerIdList contains IDs of retrieved triggers. The content of aTriggerIdList will be cleared even if this function fails.
    aListOptionsSpecified the options used for listing triggers. Default value is NULL in which case all triggers owned by the client application will be retrieved.

    ListTriggerIdsL ( RArray< TLbtTriggerId > &, CLbtListTriggerOptions * )

    IMPORT_C voidListTriggerIdsL(RArray< TLbtTriggerId > &aTriggerIdList,
    CLbtListTriggerOptions *aListOptions = NULL
    )

    Lists IDs of triggers that are owned by the client application.

    Client applications can specify options used in retrieving trigger IDs.

    This method requires Location capability.

    See also: CLbtListTriggerOptions

    panic
    LocTriggering ELbtServerBadHandle If the subsession is not opened.
    leave
    KErrNotSupported If there is an area filter used and the area is not a type of geographical circular or rectangular area.
    leave
    Other standard Symbian error code, such as KErrNoMemory, KErrServerBusy, KErrGeneral, etc.
    ParameterDescription
    aTriggerIdListOn return, aTriggerIdList contains IDs of retrieved triggers. The content of aTriggerIdList will be cleared even if this function fails.
    aListOptionsSpecified the options used for listing triggers. By default, the value is NULL. In this case, all triggers owned by the client application will be retrieved.

    NotifyTriggerChangeEvent ( TLbtTriggerChangeEvent &, TRequestStatus & )

    IMPORT_C voidNotifyTriggerChangeEvent(TLbtTriggerChangeEvent &aEvent,
    TRequestStatus &aStatus
    )

    Listens for change events of the triggers owned by the client application.

    This method is used by the client application to get change events when one or many of its triggers are changed.

    Triggers can be deleted and modified not only by the owner process and trigger handling process, but also by other system application, e.g. system management UI application.

    This function is asynchronous and it will complete the request status when an event occurs. Client applications can get detailed information of the change from the retrieved event object. Client application shall call this function again to get further change event.

    Event listening can be cancelled by calling CancelNotifyTriggerChangeEvent().

    This method requires Location capability.

    panic
    LocTriggering ELbtServerBadHandle If the subsession is not opened.
    panic
    LocTriggering ELbtDuplicateRequest If the subsession has already an outstanding NotifyTriggerChangeEvent() request.
    ParameterDescription
    aEventWill contain the event information when an event occurs.
    aStatusWill be completed with KErrNone if an event occurs and an error code(for example, KErrServerBusy, etc.) if some error was encountered.

    NotifyTriggerFired ( TLbtTriggerFireInfo &, TRequestStatus & )

    IMPORT_C voidNotifyTriggerFired(TLbtTriggerFireInfo &aFireInfo,
    TRequestStatus &aStatus
    )

    Listens for the event if any trigger is fired.

    Client applications can use this method to get notified when a trigger (session triggers and start-up triggers) is fired. The firing information is returned to the client application. If more that one trigger is fired, Location Triggers Server will complete the request and the first fired trigger is returned. Client application shall call this method again to get next trigger firing event.

    When a start-up trigger is fired, Location Triggering Server will first launch the specified trigger handling process, and then notify the client application about the firing event.

    A client application will get firing event of
    • triggers that are created by itself(Client application is the owner process of the trigger).

    • triggers that trigger handling process SID is set and matches SID of the client application's process(Client application is the triggering handling process of the trigger, and it can access the trigger).

    The request is canceled by CancelNotifyTriggerFired()

    This method requires Location capability.

    panic
    LocTriggering ELbtServerBadHandle If the subsession is not opened.
    panic
    LocTriggering ELbtDuplicateRequest If the subsession has already an outstanding NotifyTriggerFired() request.
    ParameterDescription
    aFireInfoOn return contains the fired trigger's firing information.
    aStatusWill be completed with KErrNone if an event occurs, and an error code( for example KErrServerBusy, etc.) if some error encountered.

    NotifyTriggeringSystemSettingChange ( TLbtTriggeringSystemSettings &, TRequestStatus & )

    IMPORT_C voidNotifyTriggeringSystemSettingChange(TLbtTriggeringSystemSettings &aSettings,
    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.
    ParameterDescription
    aSettingsOn return contains the new triggering system settings.
    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.

    Open ( RLbtServer & )

    IMPORT_C TIntOpen(RLbtServer &aServer)

    Opens a subsession with Location Triggering Server.

    A subsession must be opened before any other service can be used.

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

    Returns: KErrNone if successful. Otherwise, Symbian standard error code is returned, such as KErrNoMemory, KErrServerBusy, etc.

    Open ( )

    IMPORT_C TIntOpen()

    Connect and open a subsession with Location Triggering Server.

    Note, this function will connect and create a session to Location Triggering Server. Client application shall avoid unnecesary session connection to Location Triggering Server. Whenever possible, client applicaiton shall reuse same session to open a subsession.

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

    Returns: KErrNone if successful. Otherwise, Symbian standard error code is returned, such as KErrNoMemory, KErrServerBusy, etc.

    SetTriggerStateL ( TLbtTriggerId, CLbtTriggerEntry::TLbtTriggerState, TLbtFireOnUpdate )

    IMPORT_C voidSetTriggerStateL(TLbtTriggerIdaId,
    CLbtTriggerEntry::TLbtTriggerStateaState,
    TLbtFireOnUpdateaFireOnUpdate
    )

    Sets the state of the specified trigger. Client application can change the state of only triggers owned by it.

    To enable the trigger, set the trigger state to ELbtTriggerEnabled. To disable the trigger, set the trigger state to ELbtTriggerDisabled.

    Changing state of any type triggers requires Location capability. WriteUserData capability is required in addition to change state of start-up triggers.

    panic
    LocTriggering ELbtServerBadHandle If the subsession is not opened.
    leave
    KErrNotFound If the specified trigger is not found or it's not owned by the client application.
    leave
    Other standard Symbian error code, such as KErrNoMemory, KErrServerBusy, KErrGeneral, etc.
    ParameterDescription
    aIdThe ID of the trigger whose state will be updated.
    aStateNew state of the specified trigger.
    aFireOnUpdateThe parameter specifies if the trigger can be fired right after the update operation.If this parameter is ETrue. For entry type of trigger, if the trigger is updated inside the trigger area, it is fired right after it is updated. For exit type of trigger, if the trigger is updated outside of the trigger area, it is fired right after it is updated.If this parameter is EFalse. For entry type of trigger, if the trigger is updated inside the trigger area, it will not be fired immediately. The trigger will be fired when the terminal moves outside of the trigger area and then enters the trigger area again. For exit type of trigger, if the trigger is updated outside of trigger area it will be fired immediately. The trigger will be fired when the terminal moves into the trigger area and then moves out again.

    SetTriggersState ( TRequestStatus &, CLbtTriggerEntry::TLbtTriggerState, TLbtFireOnUpdate, CLbtTriggerFilterBase * )

    IMPORT_C voidSetTriggersState(TRequestStatus &aStatus,
    CLbtTriggerEntry::TLbtTriggerStateaState,
    TLbtFireOnUpdateaFireOnUpdate,
    CLbtTriggerFilterBase *aFilter = NULL
    )

    Sets state of multiple triggers asynchronously.

    If a filter is specified, all triggers owned by the client application that fulfill the criteria will be affected.

    If no filter is specified, all triggers owned by the client application will be affected.

    If no trigger that are owned by the client application fulfills the specified criteria, no trigger will be modified and this completes with KErrNotFound.

    Changing state of any type triggers requires Location capability. WriteUserData capability is required in addition to change state of start-up triggers.

    panic
    LocTriggering ELbtServerBadHandle If the subsession is not opened.
    ParameterDescription
    aStatusContains the error code when the request is completed.KErrNotSupported If there is an area filter used and the area is not a type of geographical circular or rectangular area.Other standard Symbian error code, such as KErrNoMemory, KErrServerBusy, KErrGeneral, etc.
    aStateNew state of the triggers.
    aFireOnUpdateThe parameter specifies if the trigger can be fired right after the update operation.If this parameter is ETrue. For entry type of trigger, if the trigger is updated inside the trigger area, it is fired right after it is updated. For exit type of trigger, if the trigger is updated outside of the trigger area, it is fired right after it is updated.If this parameter is EFalse. For entry type of trigger, if the trigger is updated inside the trigger area, it will not be fired immediately. The trigger will be fired when the terminal moves outside of the trigger area and then enters the trigger area again. For exit type of trigger, if the trigger is updated outside of trigger area it will be fired immediately. The trigger will be fired when the terminal moves into the trigger area and then moves out again.
    aFilterThe filter to be used. Triggers that fulfill the criteria of the specified filter will be affected. Default is value is NULL in which case all triggers owned by the client application will be updated.

    SetTriggersStateL ( CLbtTriggerEntry::TLbtTriggerState, TLbtFireOnUpdate, CLbtTriggerFilterBase * )

    IMPORT_C voidSetTriggersStateL(CLbtTriggerEntry::TLbtTriggerStateaState,
    TLbtFireOnUpdateaFireOnUpdate,
    CLbtTriggerFilterBase *aFilter = NULL
    )

    Sets state of multiple triggers. Client application can change state of only triggers owned by it.

    If a filter is specified, all triggers that fulfill the criteria and owned by the requesting client application will be affected.

    If no filter is specified, all triggers owned by the client application will be affected.

    If no trigger owned by the client application fulfills the specified criteria, no trigger will be modified and the method leaves with KErrNotFound.

    Changing state of any type triggers requires Location capability. WriteUserData capability is required in addition to change state of start-up triggers.

    panic
    LocTriggering ELbtServerBadHandle If the subsession is not opened.
    leave
    KErrNotSupported If there is an area filter used and the area is not a type of geographical circular or rectangular area.
    leave
    Other standard Symbian error code, such as KErrNoMemory, KErrServerBusy, KErrGeneral, etc.
    ParameterDescription
    aStateNew state of the triggers.
    aFireOnUpdateThe parameter specifies if the trigger can be fired right after the update operation.If this parameter is ETrue. For entry type of trigger, if the trigger is updated inside the trigger area, it is fired right after it is updated. For exit type of trigger, if the trigger is updated outside of the trigger area, it is fired right after it is updated.If this parameter is EFalse. For entry type of trigger, if the trigger is updated inside the trigger area, it will not be fired immediately. The trigger will be fired when the terminal moves outside of the trigger area and then enters the trigger area again. For exit type of trigger, if the trigger is updated outside of trigger area it will be fired immediately. The trigger will be fired when the terminal moves into the trigger area and then moves out again.
    aFilterThe filter to be used. Triggers that fulfill the criteria of the specified filter will be affected. Default value is NULL in which case all triggers owned by the client application will be updated.

    UpdateTrigger ( const CLbtTriggerEntry &, TLbtTriggerAttributeFieldsMask, TLbtFireOnUpdate, TRequestStatus & )

    IMPORT_C voidUpdateTrigger(const CLbtTriggerEntry &aTrigger,
    TLbtTriggerAttributeFieldsMaskaFieldMask,
    TLbtFireOnUpdateaFireOnUpdate,
    TRequestStatus &aStatus
    )

    Changes the attributes of the specified trigger asynchronously

    Client applications can use this method to change attributes of a specified trigger that is owned by it. Client applications can only update triggers owned by itself.

    Some attributes are not modifiable after the trigger is created. Trying to change the following attributes will generate a leave with error code KErrAccessDenied.

    For any type of the trigger, the following attributes can't be modified after the trigger is created.
    • ID

    • Requestor

    • Manager UI

    The following attribute can't be modified in addition for start-up triggers.
    • Trigger handling process identity

    • Trigger handling process SID

    If the specified trigger does not belong to the client application the method leaves with KErrNotFound.

    Updating any type triggers requires Location capability. WriteUserData capability is required in addition to update start-up triggers.

    panic
    LocTriggering ELbtServerBadHandle If the subsession is not opened.
    leave
    KErrNotFound If the specified trigger is not found or it's not owned by the client application.
    leave
    KErrAccessDenied If the client application tries to change the attributes which are not modifiable.
    leave
    KErrArgument If the length of trigger name is zero or larger than KLbtMaxNameLength.
    leave
    Other standard Symbian error code, such as KErrNoMemory, KErrServerBusy, KErrGeneral, etc.
    ParameterDescription
    aTriggerThe trigger object to be updated in Location Triggering Server. The trigger ID identifies the trigger to be updated.
    aFieldMaskSpecifies the attribute fields that are valid in the aTrigger and shall be updated to the trigger. Trigger ID field in aTrigger is always used regardless whether the trigger ID field is marked or not in the mask. The attribute value in aTrigger is ignored if the attribute field in aFieldMask is not marked.
    aFireOnUpdateThe parameter specifies if the trigger can be fired right after the update operation.If this parameter is ETrue. For entry type of trigger, if the trigger is updated inside the trigger area, it is fired right after it is updated. For exit type of trigger, if the trigger is updated outside of the trigger area, it is fired right after it is updated.If this parameter is EFalse. For entry type of trigger, if the trigger is updated inside the trigger area, it will not be fired immediately. The trigger will be fired when the terminal moves outside of the trigger area and then enters the trigger area again. For exit type of trigger, if the trigger is updated outside of trigger area it will be fired immediately. The trigger will be fired when the terminal moves into the trigger area and then moves out again.

    UpdateTriggerL ( const CLbtTriggerEntry &, TLbtTriggerAttributeFieldsMask, TLbtFireOnUpdate )

    IMPORT_C voidUpdateTriggerL(const CLbtTriggerEntry &aTrigger,
    TLbtTriggerAttributeFieldsMaskaFieldMask,
    TLbtFireOnUpdateaFireOnUpdate
    )

    Changes the attributes of the specified trigger.

    Client applications can use this method to change attributes of a specified trigger that is owned by it. Client applications can only update triggers owned by itself.

    Some attributes are not modifiable after the trigger is created. Trying to change the following attributes will generate a leave with error code KErrAccessDenied.

    For any type of the trigger, the following attributes can't be modified after the trigger is created.
    • ID

    • Requestor

    • Manager UI

    The following attribute can't be modified in addition for start-up triggers.
    • Trigger handling process identity

    • Trigger handling process SID

    If the specified trigger does not belong to the client application the method leaves with KErrNotFound.

    Updating any type triggers requires Location capability. WriteUserData capability is required in addition to update start-up triggers.

    panic
    LocTriggering ELbtServerBadHandle If the subsession is not opened.
    leave
    KErrNotFound If the specified trigger is not found or it's not owned by the client application.
    leave
    KErrAccessDenied If the client application tries to change the attributes which are not modifiable.
    leave
    KErrArgument If the length of trigger name is zero or larger than KLbtMaxNameLength.
    leave
    Other standard Symbian error code, such as KErrNoMemory, KErrServerBusy, KErrGeneral, etc.
    ParameterDescription
    aTriggerThe trigger object to be updated in Location Triggering Server. The trigger ID identifies the trigger to be updated.
    aFieldMaskSpecifies the attribute fields that are valid in the aTrigger and shall be updated to the trigger. Trigger ID field in aTrigger is always used regardless whether the trigger ID field is marked or not in the mask. The attribute value in aTrigger is ignored if the attribute field in aFieldMask is not marked.
    aFireOnUpdateThe parameter specifies if the trigger can be fired right after the update operation.If this parameter is ETrue. For entry type of trigger, if the trigger is updated inside the trigger area, it is fired right after it is updated. For exit type of trigger, if the trigger is updated outside of the trigger area, it is fired right after it is updated.If this parameter is EFalse. For entry type of trigger, if the trigger is updated inside the trigger area, it will not be fired immediately. The trigger will be fired when the terminal moves outside of the trigger area and then enters the trigger area again. For exit type of trigger, if the trigger is updated outside of trigger area it will be fired immediately. The trigger will be fired when the terminal moves into the trigger area and then moves out again.